"An existing connection was forcibly closed by the remote host." when raising event  
Author Message
dgolds





PostPosted: .NET Remoting and Runtime Serialization, "An existing connection was forcibly closed by the remote host." when raising event Top

I have a remoting application with a client, server service, remote object library that connects to SQL2005 DB, and an Event Listener. When I try to raise an event in the remote object library (after a successful insert to refresh the clients) with a handler added for a method in the listener that raises a local event to be handled in the client, the insert succeeds, but nothing else happens. When I exit the client, I get an "The read operation failed, see inner exception." exception with an inner exception of "An existing connection was forcibly closed by the remote host".

If I comment out the "RaiseEvent" lines and add a line of code to the client to update the form, (the same line that's in the client event handler that doesn't seem to fire), the whole thing works perfectly. Also, if I put all the projects on the same machine and dont configure for remoting, the whole event thing works perfectly. I also have other remote method calls that read and insert to the db that work fine. The problem is, for this method (and some others I haven't coded yet), I need all clients to be notified, not just the one that executed the method. Should I be using delegates instead of events I haven't tried it yet, but I kind of think the same thing would happen. Any suggestions, ideas, or insight would be greatly appreciated.

Thanks,

Dave



.NET Development28