ChannelServices.UnregisterChannel(IChannel) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Unregisters a particular channel from the registered channels list.
public:
static void UnregisterChannel(System::Runtime::Remoting::Channels::IChannel ^ chnl);
public static void UnregisterChannel (System.Runtime.Remoting.Channels.IChannel chnl);
static member UnregisterChannel : System.Runtime.Remoting.Channels.IChannel -> unit
Public Shared Sub UnregisterChannel (chnl As IChannel)
Parameters
- chnl
- IChannel
The channel to unregister.
Exceptions
The chnl
parameter is null
.
The channel is not registered.
At least one of the callers higher in the callstack does not have permission to configure remoting types and channels.
Examples
System::Console::WriteLine( "Hit <enter> to unregister the channels..." );
System::Console::ReadLine();
// Unregister the 'HttpChannel' and 'TcpChannel' channels.
ChannelServices::UnregisterChannel( myTcpChannel );
ChannelServices::UnregisterChannel( myHttpChannel );
Console::WriteLine( "Unregistered the channels." );
System.Console.WriteLine("Hit <enter> to unregister the channels...");
System.Console.ReadLine();
// Unregister the 'HttpChannel' and 'TcpChannel' channels.
ChannelServices.UnregisterChannel(myTcpChannel);
ChannelServices.UnregisterChannel(myHttpChannel);
Console.WriteLine("Unregistered the channels.");
System.Console.WriteLine("Hit <enter> to unregister the channels...")
System.Console.ReadLine()
' Unregister the 'HttpChannel' and 'TcpChannel' channels.
ChannelServices.UnregisterChannel(myTcpChannel)
ChannelServices.UnregisterChannel(myHttpChannel)
Console.WriteLine("Unregistered the channels.")
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.