Share via


<channels> Element (Instance)

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 channels that the application uses to communicate with remote objects. This element configures channel templates or declares new channels for use with the specified application. This element may occur in an application configuration file, machine configuration file.

Schema Hierarchy

<configuration>
  <system.runtime.remoting> Element
    <application> Element
      <channels> Element (Instance)

Syntax

<channels> 
   <channel/> 
</channels>

Attributes and Elements

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

Attributes

None.

Child Elements

Element Description

channel

Describes the channel that the application uses to communicate with remote objects. Occurs one or more times in the <channels> element.

Parent Elements

Element Description

application

Contains information about remote objects the application consumes and exposes.

configuration

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

system.runtime.remoting

Contains information about remote objects and channels.

Remarks

Channels can be registered only in application configuration files.

Example

The following configuration file declares the location of a remote type for a client application and uses the <channels> instance element to specify to the .NET Framework remoting system that it should locate an appropriate port from which to connect to the server object, and that it should use the default HttpChannel.

<configuration>
   <system.runtime.remoting>
      <application>
         <client>
            <wellknown 
               type="RemoteType, RemoteAssembly"
               url="https://computername:8080/RemoteType.rem"
            />
         </client>
         <channels>
            <channel 
               ref="http" 
               port="0"
            />
         </channels>
      </application>
   </system.runtime.remoting>
</configuration>

See Also

Reference

Remoting Settings Schema

Concepts

Sinks and Sink Chains

Copyright © 2007 by Microsoft Corporation. All rights reserved.