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" ?>
<configuration>
<system.serviceModel>
<services>
<service name="VikasGoyal.WCF.BankService" behaviorConfiguration="BankServiceBehaviors" >
<endpoint contract="VikasGoyal.WCF.IBank" binding="wsHttpBinding"/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="BankServiceBehaviors" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
No comments:
Post a Comment