Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi,

 

i'm doing a bit of preparation for my uni project that i'm currently designing. I'm just trying to think forward to my implementation so i know what i can design and what i can't now.

 

i need my asp.net application to be able to give a vb.net app, that is already running on the same computer as the asp.net application, some data. So basically a user can give data to the asp.net application through the web and then the data is passed to the vb.net application to deal with.

 

is it possible for a running application to pass data to another already-running application? i could just have the asp.net app dump the data in an xml file or database and get the vb.net application check that location every repetition for new instrucitons but its a bit untidy and i'd rather do it in memory somehow by having a shared data structure. the asp.net be able to find the vb.net app's datastructure, gain control of it and dump data in it.

 

i've read that an application that starts two threads within itself can have a shared data structure between the two threads but this is a seperate application trying to talk to another seperate application.

 

any suggestions?

  • *Gurus*
Posted

The most important consideration to make is the contexts in which the applications are executing. The ASP.NET application is going to be running under the ASPNET system account and the VB.NET application will be running under the user account of your choice.

 

Assuming that barrier can't be eliminated and also remembering that the ASPNET system account has very limited access to the file system by default, we can determine that the best course of action would be to use a method that requires very few privileges: Windows sockets. This is the common method of communication between unequally privileged processes running on different accounts (or different machines) or as Windows services.

Posted

ok. i have a book on .net network programming, i'm sure that will cover sockets. i know the theory from working with java.

 

out of interest. what would be the best method of communication between two seperate VB.net applications? is there another method of communication for that situation?

  • *Gurus*
Posted
There is the common method of polling a file, [api]SendMessage[/api], [api]ReadProcessMemory[/api], DTE, a shared DLL, registry keys, RPC, pipes, COM servers... etc. None of these work well in a .NET environment however, and I strongly recommend against many, if not all of them. Socket-based interprocess communication under .NET is far more appropriate and wide spread.
  • 2 years later...
Posted

I am in need of interprocess communications as well. These must be bidirectional and occur based on user interaction from either end (thus not fitting a client/server implementation so well).

 

Is the best way to do this to set up a client and a server in each apliaction and make them essential one way communications? Any examples of using sockets to do bi-direction user-initiated information.

 

For lack of a better example... 2 IM clients that want to talk to one another without the use of a server.

 

Spektre

 

There is the common method of polling a file' date=' [api']SendMessage[/api], [api]ReadProcessMemory[/api], DTE, a shared DLL, registry keys, RPC, pipes, COM servers... etc. None of these work well in a .NET environment however, and I strongly recommend against many, if not all of them. Socket-based interprocess communication under .NET is far more appropriate and wide spread.
  • 1 month later...
Posted

you guys are way over complicating this i think.

 

Remoting is the perfect application model.

 

.net 2.0? IPC remoting.

 

here is an example I wote on the msdn forums for win app to win app, can be easily switched to make the client an asp.net application against a vb.net server.

Joe Mamma

Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.

Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...