我一直有这个问题了。
问题是,您可以停止调用RemotingConfiguration.Configure()但不使该通道可用的应用程序。它与端口有关,或者它可能只是频道的名称,我不确定。
我发现似乎工作的解决方案是获取注册的频道并取消注册您想要删除的频道。
下面是一些代码
RemotingConfiguration.Configure(appConfig, false);
// do this to unregister the channel
IChannel[] regChannels = ChannelServices.RegisteredChannels;
IChannel channel = (IChannel)ChannelServices.GetChannel(regChannels[0].ChannelName);
ChannelServices.UnregisterChannel(channel);
RemotingConfiguration.Configure(appConfig, false); // this is just a test to see if we get an error
我希望这对你的作品,这对我来说
如果我知道它已经登记的,我不会把RemotingConfiguration.Configure(),以避免例外。 – 2009-07-22 18:45:22
但它不会被注册到_you_,会吗? – 2009-07-22 19:06:01