D
Derrick
Hello all;
I'm having a bit of trouble with .NET remoting. Here's my scenario:
I have a "remotable" type which is served by a Windows Service. I
have a WinForms app which consumes the remotable type. I'm using the
Observer pattern, so the client registers with the server, and the
server refreshes the client as appropriate (doing it this way because
the server polls a device over the serial port, and will update any
registered clients after the poll cycle is complete).
When I start the service, then load the WinForms app, everything works
just fine. However, if I exit the WinForms app, let the service
continue running and then start the WinForms app a second time, I get
the "Server refused connection" exception. If I restart the service,
everything works again.
I assume that there's some kind of remoting clean up I should be
doing, either as the Win app exits, or on the server side as the
Observer unregisters (which I do on dispose of the WinForm)? For what
it's worth, I'm doing all the remoting config programmatically.
Thanks for any help,
Derrick
I'm having a bit of trouble with .NET remoting. Here's my scenario:
I have a "remotable" type which is served by a Windows Service. I
have a WinForms app which consumes the remotable type. I'm using the
Observer pattern, so the client registers with the server, and the
server refreshes the client as appropriate (doing it this way because
the server polls a device over the serial port, and will update any
registered clients after the poll cycle is complete).
When I start the service, then load the WinForms app, everything works
just fine. However, if I exit the WinForms app, let the service
continue running and then start the WinForms app a second time, I get
the "Server refused connection" exception. If I restart the service,
everything works again.
I assume that there's some kind of remoting clean up I should be
doing, either as the Win app exits, or on the server side as the
Observer unregisters (which I do on dispose of the WinForm)? For what
it's worth, I'm doing all the remoting config programmatically.
Thanks for any help,
Derrick