문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top