<channels> Element (Template)

This topic is specific to a legacy technology that is retained for backward compatibility with existing applications and is not recommended for new development. Distributed applications should now be developed using the  Windows Communication Foundation (WCF).

Contains channel templates that the application uses to communicate with remote objects. Channels declared under this element are available for referencing anywhere a channel is registered. This element may occur in an application configuration file, machine configuration file.


The following sections describe attributes, child elements, and parent elements.



Child Elements

Element Description


Contains the channel template that the application can specify and configure to communicate with or listen to requests for remote objects. Occurs one or more times in the <channels> element.

Parent Elements

Element Description


The root element in every configuration file used by the common language runtime and .NET Framework applications.


Contains information about remote objects and channels.

Channel templates can be in application configuration files, separate configuration files, or the machine configuration file.

The following configuration file uses a <channels> template element to declare an HttpChannel with the id "httpbinary" that uses the BinaryClientFormatterSink to serialize the remote calls. It then requests that this client application use that particular channel configuration by specifying ref="httpbinary" in the <channel> instance element inside the <application> element. Note that any use of the type attribute to specify a type in an assembly that is in the global assembly cache requires complete type information, including version, culture, and public key information. That information has been omitted from the type attributes below for brevity.

            type="System.Runtime.Remoting.Channels.Http.HttpChannel, System.Runtime.Remoting, ...." 
                      type="System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider, System.Runtime.Remoting, ...."
            <channel ref="httpbinary"/>
               type="RemoteType, RemoteAssembly"
      <debug loadTypes="true"/>

Copyright © 2007 by Microsoft Corporation. All rights reserved.