Groups | Blog | Home
all groups > dotnet remoting > april 2005 >

dotnet remoting : Can Not Remove "Listener" Remote Client From Collection


dotNetDave
4/25/2005 10:36:02 AM
I have an assembly that mainly communicates to clients via events. I need to
turn this into a remotable service. I read that remoting events can be error
prone, so I read an article about the setting up a Listener and Broadcaster
(that keeps an collection of Listeners). This works great except for one
problem... if the Listener application ends the wrong way and does not
"disconnect" itself properly from the Broadcaster then the next time
Broadcaster tries to call a method on the Listener, then it fails. When this
happens, I catch the exception and try to remove the Listener from the
Listener collection. As soon as I call .Remove on the collection I get this
socket error:

"No connection could be made because the target machine actively refused it"

I have tried and tried and can't seem to get around it. Even trying to call
Dispose on the proxy object first yields the same error.

Please let me know if anyone has any ideas.

Thanks,
Terry
4/26/2005 7:49:04 AM
Dave...I am having a similar problem that I just posted. What article were
you referring to and what method are you using to set up the
listener...Thanks...Terry

[quoted text, click to view]
AddThis Social Bookmark Button