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::GetChannel Method (String^)
.NET Framework (current version)
Returns a registered channel with the specified name.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- name
-
Type:
System::String^
The channel name.
Return Value
Type: System.Runtime.Remoting.Channels::IChannel^An interface to a registered channel, or null if the channel is not registered.
| Exception | Condition |
|---|---|
| SecurityException | The immediate caller does not have infrastructure permission. |
HttpChannel^ myClientChannel = gcnew HttpChannel( myProperties,gcnew SoapClientFormatterSinkProvider,gcnew SoapServerFormatterSinkProvider ); ChannelServices::RegisterChannel( myClientChannel, false ); // Get the registered channel. Console::WriteLine( "Channel Name : {0}", ChannelServices::GetChannel( myClientChannel->ChannelName )->ChannelName ); Console::WriteLine( "Channel Priorty : {0}", ChannelServices::GetChannel( myClientChannel->ChannelName )->ChannelPriority );
SecurityPermission
For operating with infrastructure code. Demand value: SecurityAction::LinkDemand; Permission value: SecurityPermissionFlag::Infrastructure
.NET Framework
Available since 1.1
Available since 1.1
Show: