EndPoint in WCF Service

End point consists of three components.

Address

Basically URL, specifies where this WCF service is hosted .Client will use this url to connect to the service. e.g:

http://localhost:8080/Test/MyService.svc

Binding

Binding will describes how client will communicate with service

Example

BasicHttpBinding--Basic Web service communication. No security by default
WSHttpBinding Web services with WS-* support. Supports transactions
WSDualHttpBinding Web services with duplex contract and transaction support etc..

Contract

Collection of operation that specifies what the endpoint will communicate with outside world. Usually name of the Interface will be mentioned in the Contract, so the client application will be aware of the operations which are exposed to the client

Endpoints will be mentioned in the web.config file on the created service.

<system.serviceModel>

  <services>

    <service name="IMyService"

    behaviorConfiguration="MyServiceBehavior">

      <endpoint

      address="http://localhost:8080/Test/MyService.svc" contract="IMyService"

      binding="wsHttpBinding"/>

    </service>

  </services>

  <behaviors>

  </behaviors>

</system.serviceModel>

 

Ebook Download
View all
Learn
View all