Windows Communication Foundation

Since WCF has been introduced in .Net 3.0, it’s keep growing and the features available are also improving. Lets see how WCF works.

Actually there are many reasons to communicate one application to another or utilize resources available in the market. There are different connection scenarios for this. Webservices is one such where one application exposes a service which can consumed by clients which are able access that. There can be one-way, request-reply or duplex types of communications.
Earlier Microsoft shipped different tools for each type of communications. So it’s really a correct solution. So they introduced WCF which is able to perform all the major communication types available in the market.
The process of WCF is simple:
Typically, for any client to consume the service what it needs is
1. Where to find the service?
2. How to connect the service?
3. And What are the operations available from the service?
With the WCF, they have provided different bindings(System Provided) to define the connectivity part

BindingConfiguration ElementDescription
BasicHTTPBinding<basicHttpBinding>This binding is more suitable for communication with basic WS-Basic profile webservices. Similar to ASP.Net Webservices (ASMX). This uses HTTP as transport protocol and MTOM(xml) as default message encoding. Supports Transport, Message and Mixed security modes. Will not support Sessions and Transactions. Supports buffered streaming.
WSHTTPBinding<wsHttpBinding>Provides secure and interoperable communication (WS*), suitable for non duplex connections. Uses SOAP protocol, and text as default encoding. Supports security (Transport, Mixed, Message modes), by default at message mode. Supports Sessions (Reliable, Security) by default none.
WSDualHttpBinding<wsDualHttpBinding>Provides secure, interoperable, reliable and duplex communication contract with text encoding by default. Supports Security at message level by default and only security mode available. Supports sessions(Reliable, Security) with reliablesession as default.
WSFederationHttpBinding<wsFederationHttpBinding>This binding is basically used federation communication. supports security(Message, Mixed, none) at Message level by default. Supports sessions (Reliable, Security). Transactions are allowed.
NetHttpBinding<netHttpBinding>This binding is basically designed for consuming HTTP or websocket services and uses binary encoding by default. Websockets are only supported on Windows 8. NetHttpBinding will check for request-reply or duplex contract and change its behavior accordingly. It will use HTTP for request-reply and websockets for duplex.
NetHttpsBinding<netHttpsBinding>A secure netHttpBinding.
NetTcpBinding<netTcpBinding>This binding replaces the earlier .net remoting. This secure way of communicating between two WCF capable services.
NetNamedPipeBinding<netNamedPipeBinding>This binding generates a run-time communication stack by default, which uses transport security, named pipes for message delivery and a binary message encoding. This is appropriate for on machine WCF communications. It also supports transactions.
NetMsmqBinding<netMsmqBinding>This binding provides support for queuing by using Message Queuing (MSMQ) as a transport and enables support for loosely-coupled applications, failure isolation, load leveling and disconnected operations.
NetPeerTcpBinding<netPeerTcpBinding>This binding provides a secure connection for multiple machine communication. provides support for the creation of peer networking applications that use a TCP-level peer-to-peer mesh infrastructure. Each PeerNode instance can host multiple peer channels defined with this binding type.
MsmqIntegrationBinding<msmqIntegrationBinding>This binding is suitable for cross-machine communication between a WCF application and existing MSMQ applications.
WebHttpBinding<webHttpBinding>WCF allows to expose WCF web services through HTTP requests that use "plan old XML" (POX) style messaging instead of SOAP-based messaging. For clients to communicate with a service using HTTP requests, an endpoint of the service must be configured with the WebHttpBinding that has the WebHttpBehavior attached to it. The WCF also requires that the individual service operations are annotated with WebGet or WebInvoke attributes.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.