System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel Method

Registers a channel with the channel services. ChannelServices.RegisterChannel(IChannel) is obsolete. Please use ChannelServices.RegisterChannel(IChannel, bool) instead.

Syntax

[System.Obsolete("Use RegisterChannel(IChannel,Boolean)")]
public static void RegisterChannel (IChannel chnl)

Parameters

chnl
The channel to register.

Remarks

Note:

ChannelServices.RegisterChannel(IChannel) is obsolete. Please use ChannelServices.RegisterChannel(IChannel, bool) instead.

The ChannelServices.RegisterChannel(IChannel) method takes in the System.Runtime.Remoting.Channels.IChannel interface from a channel object. The channel's IChannel.ChannelName must be unique, or the channel must be anonymous. A channel is anonymous if the IChannel.ChannelName is set to either null or string.Empty by using the name configuration property.

You cannot register two channels with the same name in a AppDomain. By default, the name of a System.Runtime.Remoting.Channels.Http.HttpChannel is "http" and the name of a System.Runtime.Remoting.Channels.Tcp.TcpChannel is "tcp." Therefore, if you want to register two channels of the same type, you must specify a different name for one of them through configuration properties.

For more information about channel configuration properties, see System.Runtime.Remoting.Channels.Http.HttpChannel, and [<topic://gnconchanneltemplate>].

Requirements

Namespace: System.Runtime.Remoting.Channels
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0