The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
ChannelServices::UnregisterChannel Method (IChannel^)
.NET Framework (current version)
Unregisters a particular channel from the registered channels list.
Assembly: mscorlib (in mscorlib.dll)
public: [SecurityPermissionAttribute(SecurityAction::Demand, Flags = SecurityPermissionFlag::RemotingConfiguration)] static void UnregisterChannel( IChannel^ chnl )
Parameters
- chnl
-
Type:
System.Runtime.Remoting.Channels::IChannel^
The channel to unregister.
| Exception | Condition |
|---|---|
| ArgumentNullException | The chnl parameter is null. |
| ArgumentException | The channel is not registered. |
| SecurityException | At least one of the callers higher in the callstack does not have permission to configure remoting types and 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." );
SecurityPermission
For configuration of the remoting infrastructure. Demand value: SecurityAction::Demand; Permission value: SecurityPermissionFlag::RemotingConfiguration
.NET Framework
Available since 1.1
Available since 1.1
Show: