Bagikan melalui


How to: Configure a Channel in a Configuration File

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).

This code example shows how to configure a channel in a configuration file, in a <channel> Element (Instance). If you want to specify a template that uses a type that is in the global assembly cache, you must include all versioning and strong-name information to bind to the proper type.

Example

<channel 
   name="MyCustomChannel"  
   priority="2"
   type="CustomChannelName, CustomAssembly, Version=1.0.6940.0, Culture=neutral, PublicKeyToken=somepublickeystring" 
/>

See Also

Concepts

Channel and Formatter Configuration Properties