Thanks Ingo! This looks like it might do the trick! One last question, could I do something wacky such as enumerating the threads on the machine and get the handle for the object out of the appropriate thread? I'd rather not do it this way, but just checking to see if it could be done.
-----Original Message----- From: Ingo Rammer [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 11:42 AM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Webservice to existing object? Hi Bill, you could use .NET Remoting in this case as it allows you to run "WebServices anywhere". You can also publish an existing object instance on a given URL and allow remote clients to call its methods (from any .NET application, not just when using IIS as a server). For more information, please look at http://www.dotnetremoting.cc/FAQs/PUBLISHING_OBJECT.asp [and maybe also http://www.dotnetremoting.cc/FAQs/singleton_is_dying.asp to read a little about the lifetime issues involved when doing this] HTH, -Ingo Author of "Advanced .NET Remoting" http://www.dotnetremoting.cc > -----Original Message----- > From: Erskine, Bill [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 02, 2002 4:24 PM > To: [EMAIL PROTECTED] > Subject: [DOTNET] Webservice to existing object? > > > Is there any way for a webservice to call methods on an > object existing in a > different thread already running in an .exe? > > I have this "gateway" running as a .NET .exe that polls a database for > messages to send through socket communication to a legacy > system. We use a > webservice to place a message to send to the legacy system in > the database. > When the "gateway" polls that database and finds a new > message it calls the > "send" function. This works fine, but I would prefer a > solution that didn't > involve polling or using any type of queue. > > I would just create a new instance of the "gateway" object > whenever I wanted > to send a message, but establishing a connection to the legacy system > requires a tedious handshake ritual that takes several seconds. > > I'm looking for a more efficient way to send message a > message through this > gateway to the legacy system, and wondered if the webservice > that inserts > the message into the database could also call the send method of the > "gateway" .exe. Any ideas? > > Thanks! > > You can read messages from the DOTNET archive, unsubscribe > from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.