This topic has not yet been rated - Rate this topic

ChannelServices Class

Provides static methods to aid with remoting channel registration, resolution, and URL discovery. This class cannot be inherited.

System.Object
  System.Runtime.Remoting.Channels.ChannelServices

Namespace:  System.Runtime.Remoting.Channels
Assembly:  mscorlib (in mscorlib.dll)
[ComVisibleAttribute(true)]
public sealed class ChannelServices

The ChannelServices type exposes the following members.

  Name Description
Public property Static member RegisteredChannels Gets a list of currently registered channels.
Top
  Name Description
Public method Static member AsyncDispatchMessage Asynchronously dispatches the given message to the server-side chain(s) based on the URI embedded in the message.
Public method Static member CreateServerChannelSinkChain Creates a channel sink chain for the specified channel.
Public method Static member DispatchMessage Dispatches incoming remote calls.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Static member GetChannel Returns a registered channel with the specified name.
Public method Static member GetChannelSinkProperties Returns a IDictionary of properties for a given proxy.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Static member GetUrlsForObject Returns an array of all the URLs that can be used to reach the specified object.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Static member RegisterChannel(IChannel) Obsolete. Registers a channel with the channel services. RegisterChannel(IChannel) is obsolete. Please use RegisterChannel(IChannel, Boolean) instead.
Public method Static member RegisterChannel(IChannel, Boolean) Registers a channel with the channel services.
Public method Static member SyncDispatchMessage Synchronously dispatches the incoming message to the server-side chain(s) based on the URI embedded in the message.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Static member UnregisterChannel Unregisters a particular channel from the registered channels list.
Top

Channels transport messages between applications across such remoting boundaries as application domains, processes, and computers. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range of protocols, even though the runtime might not be at the other end of the channel. Run-time objects can be used to expose a wide range of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols.

Channels must expose the IChannel interface, which provides informational properties such as the ChannelName and ChannelPriority. Channels are registered using the ChannelServices.RegisterChannel method. Channels can also be loaded from the remoting configuration. (See [<topic://gnconchanneltemplate>] for details.)

On the client side, messages are handed off to the client channel sink chain after they traverse the client Context chain. The first channel sink is typically a IClientFormatterSink, which serializes the message into a stream that is passed down the channel sink chain to the client transport sink. The client transport sink then writes this stream out to the wire.

On the server side, the server transport sink reads requests off the wire and passes the request stream to the server channel sink chain. The server formatter sink at the end of this chain will deserialize the request into a message. It will then hand this message off to the remoting infrastructure, which will dispatch it to the server Context chain.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ