Frage

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.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top