Windows apps
Collapse the table of content
Expand the table of content
Information
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^)

 

Unregisters a particular channel from the registered channels list.

Namespace:   System.Runtime.Remoting.Channels
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
Return to top
Show:
© 2017 Microsoft