Understanding Different Types of Bindings in WCF

Understanding Different Types of Bindings in WCF

This article offers a brief explanation on the basic concepts of the Communication part in the Windows Communication Foundation. WCF binding is generally set of binding elements and each element specify the communication between client and service. Each binding must have at least one transport element and one message encoding element. Click here to understand various types of Contracts in WCF.

BasicHttpBinding

  1. It is suitable for communicating with ASP.NET Web services (ASMX)-based services that comfort with WS-Basic Profile conformant Web services.
  2. This binding uses HTTP as the transport and text/XML as the default message encoding.
  3. You can also use Https with this binding.

WSHttpBinding

  1. Defines a secure, reliable, interoperable binding.
  2. It supports WS-* functionality and distributed transactions with reliable and secure sessions using SOAP security.
  3. It uses HTTP and HTTPS transport for communication.
  4. Reliable sessions are not supported

WSDualHttpBinding

This binding is same as that of WSHttpBinding, except it supports duplex service. Duplex service is a service which uses duplex message pattern, which allows service to communicate with client via callback.

In WSDualHttpBinding reliable sessions are enabled by default.

WSFederationHttpBinding

This binding support federated security. It helps implementing federation which is the ability to flow and share identities across multiple enterprises or trust domains for authentication and authorization. It supports WS-Federation protocol.

NetTcpBinding

Provides .Net to .Net cross machine communication. By default it creates communication stack using WS-ReliableMessaging protocol for reliability, TCP for message delivery and windows security for message and authentication at run time. It uses TCP protocol and provides support for security, transaction and reliability.

NetNamedPipeBinding

Provides on-machine cross process communication. It uses NamedPipe protocol and provides full support for SOAP security, transaction and reliability.It creates communication stack with WS-ReliableMessaging for reliability, transport security for transfer security, named pipes for message delivery and binary encoding.

NetMsmqBinding

  1. This binding provides secure and reliable queued communication for cross-machine environment.
  2. Queuing is provided by using MSMQ as transport.
  3. It enables for disconnected operations, failure isolation
  4. Microsoft Message Queuing (MSMQ) is Microsoft’s solution to reliable, robust distributed application design.

NetPeerTcpBinding

  1. This binding provides secure binding for peer-to-peer environment and network applications.
  2. It uses TCP protocol for communication
  3. It provides full support for SOAP security, transaction and reliability
comments powered by Disqus

Related Articles