tigz Posted October 26, 2003 Posted October 26, 2003 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? Quote
*Gurus* Derek Stone Posted October 26, 2003 *Gurus* Posted October 26, 2003 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. Quote Posting Guidelines
tigz Posted October 28, 2003 Author Posted October 28, 2003 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? Quote
*Gurus* Derek Stone Posted October 28, 2003 *Gurus* Posted October 28, 2003 There are a half-dozen methods that could be eimployed, but none really offer the same benefits as sockets do. Granted sockets aren't the perfect solution, but they are by far the most used method of interprocess communication. Quote Posting Guidelines
tigz Posted October 29, 2003 Author Posted October 29, 2003 can u name some others? so i'm aware of them and can read about them thanks 4 help btw Quote
*Gurus* Derek Stone Posted October 30, 2003 *Gurus* Posted October 30, 2003 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. Quote Posting Guidelines
Spektre Posted December 1, 2005 Posted December 1, 2005 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. Quote
stevoie Posted January 12, 2006 Posted January 12, 2006 try googling for MS Message Queue. MSMQ it's called. it might be a workable solution. pretty straightforward to setup too. Quote
Joe Mamma Posted January 16, 2006 Posted January 16, 2006 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. Quote 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.
Recommended Posts