WCF – type of bindings.

WCF has a couple of built in bindings which are designed to fulfill some specific need. You can also define your own custom binding in WCF if necessary. All built in bindings are defined in the System.ServiceModel Namespace. Here is the list of bindings which are commonly used:

  1. BasicHTTPBinding

    This binding is designed to expose a WCF service as an ASMX web service. By default, it uses Http protocol for transport and encodes the message in UTF – 8 text format. No security by default. You can also use Https with this binding.

  2. WebHttpBinding

    This one is the REST-style binding, where you basically just hit a URL and get back a truckload of XML or JSON from the web service.

  3. WsHttpBinding

    With this binding the SOAP messages are encrypted by default. It is similar to BasicHTTPBinding, but in addition it also supports WS-* standards like WS-Addressing, WS-Security and WS-ReliableMessaging.

  4. WsDualHttpBinding

    It is like WsHttpBinding, with addition it supports two way communication means both clients and services can send and receive messages.

  5. NetTcpBinding

    It uses TCP protocol for communication between two machines with in intranet (means same network). It encodes the message in binary format. This is faster and more reliable binding as compared to the Http protocol bindings. It is only used when communication is WCF – to – WCF means both client and service should have WCF.

Share this post:Tweet about this on TwitterShare on Facebook0Share on LinkedIn0Share on Google+0Share on Reddit0Email this to someoneDigg this