RemotingServices.Disconnect


RemotingServices.Disconnect is probably one of the confusing APIs in remoting. It doesnt correspond to RemotingServices.Connect, but rather to RemotingServices.Marshal. Disconnect is a server side API to disconnect objects which are currently published via remoting. You might have noticed an exception if Disconnect is called on a remoting proxy instead.

This API is can be used to basically “unregister” an object. Note, that any current active invokations on the object would still succeed.

ps. It feels good to be blogging again after more than a month.


Comments (5)

  1. Govind says:

    Manish,

    Thanks for blogging, could you actually put down the steps which you suggest to debug the remoting problems.

    Govind

  2. ManishG says:

    Yeah I will try to blog about debugging issues. Is there anything specific you are running into?

  3. farshid says:

    You say that Disconnect is a server-side api, but I don’t know that how I could get an object published by my host?

    My original need is to replace assembly for hosted objects without restarting or remoting host service. I want to unregister objects to replace my assembly.

  4. manishg says:

    You can publish your custom object using RemotingServices.Marshal

  5. prateek.baxi says:

    Does that mean RemotingConfiguration.Configure cannot be used if RemotingServer.Disconnect is required? If not then how do I ge the server type from the client proxy using RemotingService.

    Problem I am facing is that evenif I closed down by Listener host application still client can access the method on the remote object

    One more, when client requests for the object, does that object is created on server or client?