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

dotnet remoting : Remoting socket / port cleanup on process termination


RJ
9/2/2005 4:30:18 PM
What cleanup should I do on the client side, after I terminate the process
that is hosting the singleton remoting server object? When I try to
activate a new server proxy in the client, using the following, the client
throws an exception : Underlying socket was closed.

Dim TargetPath As String = "tcp://localhost:" & portNum & RemotingSvrName

' Acquire the proxy to the remoting server object
_RemoteSvr = CType(Activator.GetObject( _
GetType(ITaskRemote), TargetPath), ITaskRemote)


Also the process that hosts the remoting server object throws an exception
as follows. I know the previous instance of this process has terminated, so
what socket / port is still in use?
Only one usage of each socket address (protocol/network address/port)
is normally permitted.

Thanks for any input.

m.posseth
9/3/2005 12:00:00 AM
Singleton objects resemble client activated objects in that they retain
state but the server, not the client creates them .Only one ! instance of a
singleton object is ever created ( at the first call of anny client )
so if the client disconects the singleton is still running ! ( untill the
leasetime has expired if not set to nothing wich will let it run for as long
as the host is running )

so above explains in my opinion your problem cause you can`t activate a new
object on the same channel as long as the singleton is running , you might
be better off using singlecall objects if you do not wish to retain state

regards

Michel Posseth [MCP]



[quoted text, click to view]

AddThis Social Bookmark Button