We are providing online training of realtime Live project on Asp.Net MVC with Angular and Web API. For more information click here. If you have any query then drop the messase in CONTACT FORM

Friday, May 29, 2015

A WCF Service is composed of three components


1) Service Class - A WCF service class implements some service as a set of methods.
2) Host Environment - A Host environment can be a Console application or a Windows Service or a Windows Forms application or IIS as in case of the normal ASMX web service in .NET.
3) Endpoints - All communications with the WCF service will happen via the endpoints. The endpoint is composed of 3 parts (collectively called as ABC's of the endpoint)

Three types of Endpoint

Address(Where)

Basically, the URL specifies where this WCF service is hosted. The client will use this URL to connect to the service. e.g
http://localhost:8090/MyService/Calculator.svc

Binding(How)

The binding will describes how the client will communicate with the service. There are different protocols available for the WCF to communicate to the Client. We can mention the protocol type based on our requirements.

Contract(What)

Collection of operation that specifies what the endpoint will communicate with the outside world. Usually, the 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. Each operation is a simple exchange pattern such as one-way, duplex and request/reply.

No comments: