Question

After registering a .net remoting Service with RemotingConfiguration.RegisterWellKnownServiceType(), is there any way to undo this so that the application does not offer this Service anymore?

I checked this link but surprisingly, there doesn't seem to be an UnregisterWellKnownServiceType-Method.

Was it helpful?

Solution

If you're registering your well-known type as a Singleton you could use:

RemotingServices.Disconnect(foo);

But first you would have to create the object then marshal it instead of using RegisterWellKnownServiceType:

Foo foo = new Foo();
RemotingServices.Marshal(foo, uri);

This can't be done if you're registering your well-known type as SingleCall.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top