Thursday, November 23, 2006

* WCF : Endpoints

All communication in WCF happens through endpoints.

Each endpoint contains following details :

1. Address of the endpoint. It uniquely identifies the endpoint.

2. Binding information for the client.

3. Contract that identifies the methods available.

Sample config file :

In the below config the endpoint has base address while the second end point has address as baseAddress/mex

<?xml version="1.0" encoding="utf-8" ?>
      <service name="VikasGoyal.WCF.BankService" behaviorConfiguration="BankServiceBehaviors" >
        <endpoint contract="VikasGoyal.WCF.IBank" binding="wsHttpBinding"/>
        <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
        <behavior name="BankServiceBehaviors" >
          <serviceMetadata httpGetEnabled="true" />

No comments:

Post a Comment