Saturday 10 June 2017

WCF

WCF (Windows Communication Foundation) :

1. It is a framework for building ,configuring and deploying inter operable distributed services.
2. Its code name is "Indigo".
3. It enables you to write more secure flexible services without any code change(using configuration).
    WCF = Web Service + Remoting + MSMQ + COM
    OR
    WCF = Web Service + .Net Remoting + MSMQ + COM + Enterprise Services

What is EndPoint in WCF :

EndPoint = Address(A) + Binding(B) + Contract(C)

Address : It specifies where the services is hosted.
Binding : Binding  specifies how to access the hosted service . It also specifies the transport,encoding,protocol etc.
Contract : It specifies what type of data can be sent to or received from the service.

eg. <endpoint name="BasicHttpGreetingService" address="http://localhost:5454/MyService/GeetingMyService.svc" binding="basicHttpBinding" contract="MyNamespace.MyService.IGettingService"/>


Types of Contract :

1. ServiceContract : which services are exposed to the client.
2. OperationContract : which operations the client can perform on the service.
3. DataContract : which data types are passed to and from the service,
4. MessageContract : Allow the service to interact directly with messages.
message contract can be typed or untyped and are useful in interoperability.
5. FaultContract : which errors are raised by the service and how the service handles and propagates
errors to its clients.


More Reading...! 

No comments:

Post a Comment