I use RemotingConfiguration.RegisterWellKnownClientType(...) to access an
object (singleton mode) on a remote AppDomain for a single call. Then I want
to to UNregister this type again and use it as a standard local type.
How can I do this? Using RemoteService.Disconnect(...) does not seam to
work.
Thanks.
Chris
// Disconnect object and Unregister channel
RemotingServices.Disconnect(......);
ChannelServices.UnregisterChannel(yourChannel);
// Go back and rereg again
Willy.
"Christian Bensberg" <bens...@web.de> wrote in message news:OB0g5txiBHA.772@tkmsftngp04...
client_channel = Remoting.Client.Channel();
Remoting.Client.ClientType(typeof(List), "localhost", ServicePort,
"AM7service", ListUri);
l = new List();
if(RemotingServices.IsTransparentProxy(l) != true)
throw new Exception("object is not a proxy");
// call
AppItem = new ApplicationItem(port, applicationName);
l.AddApplication(AppItem);
// disconnect
RemotingServices.Disconnect(List); // error: "Can not disconnect a proxy"
(translatet)
ChannelServices.UnregisterChannel(client_channel);
Any solutions?
Thanks
Christian Bensberg
"Christian Bensberg" <bens...@web.de> wrote in message news:OLuGv#9iBHA.2432@tkmsftngp02...
Well, you are right. I tried "l" and got the previously mentioned runtime
error. Then I replaced "l" with "List" and directly got the expected error
when building the app. I copied the wrong code into my last message.
--> It does not work with RemotingServices.Disconnect(l), as "a proxy cannot
be disconnected" (adapted from the error message). :-(
Chris