Configuring a client endpoint
May 22, 2009
Leave a comment
The followings are related (useful) articles (in addition to my notes) about configuring a WCF Client application:
MSDN Article 1: Client Configuration
Highlights:
- The <client> element has an <endpoint> element whose attributes are used to configure the endpoint ABCs.
- The <endpoint> element also contains a <metadata>,a <headers>, and an <identity>.
- Each endpoint reference the <bindings> and <behaviors> elements in the client configuration to be used to configure that endpoint.
The following shows the example in the MSDN article excluding all attributes and values. This configuration shows the overall structure of the xml elements.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<client>
<endpoint >
<metadata></metadata>
<identity></identity>
<headers></headers>
</endpoint>
</client>
<bindings>
<wsHttpBinding>
<binding>
<security></security>
</binding>
</wsHttpBinding>
</bindings>
//The behavior section references by the behaviorConfiguration endpoint attribute.
<behaviors>
<endpointBehaviors>
<behavior></behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
</configuration
MSDN Article 2. Specifying an Endpoint Address
- Each endpoint has a address associated to it. There are two ways to specify the address: In code and in the configuration file.