This documentation is archived and is not being maintained.

IChannel.ChannelName Property

Gets the name of the channel.

Namespace: System.Runtime.Remoting.Channels
Assembly: mscorlib (in mscorlib.dll)

string ChannelName { get; }
/** @property */
String get_ChannelName ()

function get ChannelName () : String

Property Value

The name of the channel.

Exception typeCondition


The immediate caller does not have infrastructure permission.

int myPort = 8085;
// Creating the 'IDictionary' to set the server object properties.
IDictionary myDictionary = new Hashtable();
myDictionary["name"] = "MyServerChannel1";
myDictionary["priority"] = 2;
myDictionary["port"] = 8085;
// Set the properties along with the constructor.
HttpServerChannel myHttpServerChannel = new HttpServerChannel(myDictionary,
                                    new BinaryServerFormatterSinkProvider());
// Register the server channel.
                              "SayHello", WellKnownObjectMode.SingleCall);  
myHttpServerChannel.WantsToListen = true;
// Start listening on a specific port.
// Get the name of the channel.
Console.WriteLine("ChannelName : " + myHttpServerChannel.ChannelName);
// Get the channel priority.
Console.WriteLine("ChannelPriority : " + myHttpServerChannel.ChannelPriority);
// Get the schema of the channel.
Console.WriteLine("ChannelScheme : " + myHttpServerChannel.ChannelScheme);
// Get the channel URI.
Console.WriteLine("GetChannelUri : " + myHttpServerChannel.GetChannelUri());
// Indicates whether 'IChannelReceiverHook' wants to be hooked into the outside listener service.
Console.WriteLine("WantsToListen : " + myHttpServerChannel.WantsToListen);

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0