WCF stands for Windows Communication Foundation, is the latest technology that enables communication between applications in the distributed environment.
Lets learn how to create , host , consume a WCF service in a series of articles
Windows Communication Foundation(WCF) is a framework for building service-oriented applications.Using WCF,you can send data as asynchronous messages from one service endpoint to another.
Lets learn WCF
from the scratch , so lets see about basic terminology which we use in the WCF
services that might help us to understand WCF
in a better way
To consume any WCF service we need the destination address where actually the service was hosted .lets assume that the below link was the destination address :
(1) (2) (3)
we can divide the above URL into three parts as i done above
(2)Service hosted location
It is the transport mechanism through which we are sending .They are different types of transport mechanisms
in WCF and more transport mechanisms can be added using the built-in-extension points of WCF
3)IPC ( Named Pipes)
We call WCF as a service so, they should be a communication between the client and the server as one way or two way or duplex .We know that communication means sending information in message format from client to server and vice-verse .
To send messages between client and server we need to bind server and client .WCF provides some in-built binding.
1)BasicHttpBinding: Basic web service communication.By default, there is no security provided for messages when the client calls happen. In other words, data is sent as plain text.
2)WsHttpBinding: It cannot be consumed by older .NET version less than 3 version.
3)WSFederationHttpBinding:This binding will describe the client to authenticate using security tokens.
4)WSDualHttpBinding :WSDualHttpBinding should be avoided if possible. WSDualHttpBinding is not interoperable . It has been deprecated in WCF
5)NetTcpBinding :Specifies a secure ,reliable optimized binding suitable for cross-machine communication.
6)NetNamedPipeBinding :Specifies a secure ,reliable optimized binding suitable for cross-machine communication with in the same machine .
7)NetMsmqBinding : The NetMsmqBinding is the queued binding WCF provides for two endpoints to communicate using MSMQ.
8)NetPeerTcpBinding : The NetPeerTcpBinding provides support for the creation of peer networking applications.
9)MsmqIntegrationBinding :MsmqIntegrationBinding enables WCF
applications to send/receive messages to and from existing MSMQ applications .
WCF contract is a set of specification that defines the interfaces of the WCF Service. They are different types of contracts .
1)Data Contracts :Data Contracts are defined with the DataContractAttribute and DataMemberAttribute
2) Service Contract : Service Contract are defined by applying the ServiceContractAttribute and OperationContractAttribute to an interface or class
3)Message Fault Contract :Message Contracts give you more control over the actual SOAP message for a service operation request or reply
4)Fault Contract : errors can be handled and error messages can be conveyed to the client applications using SOAP Fault Contract
We had seen basic terminology of WCF and in the next article we will learn in detail about Binding in WCF