What are different bindings supported by WCF?- WCF binding is a set of binding elements.
- In this, each element specifies, how the service and the client will communicate with each other.
- It requires each binding have at least one transport element and one message encoding element.
Following are the types of WCF bindings:
1. BasicHttpBinding 2. WSHttpBinding 3. WSDualHttpBinding 4. WSFederationHttpBinding 5. NetTcpBinding 6. NetNamedPipeBinding 7. NetMsmqBinding 8. NetPeerTcpBinding 9. MsmqIntegrationBinding
- You can also define your own custom binding in WCF to fulfill your need.
- It has a couple of built in bindings which are designed to fulfill your need.
1. BasicHttpBinding:
- It is provided by the BasicHttpBinding class.
- It does not support WS-*functionality like WS-Addressing, WS-Security, WS-ReliableMessaging.
- By default, it uses Http protocol for transport and encodes the messages in UTF - 8 text format.
2. WSHttpBinding:
- It defines a secure, reliable, interoperable binding which is suitable for non-duplex service contracts.
- It supports WS-*functionality and distributed transactions with reliable and secure sessions using SOAP security.
- It uses HTTP and HTTPS transport for communication.
3. WSDualHttpBinding:
- It supports duplex service.
- It uses duplex message pattern which allows the service to communicate with clients via callback.
4. WSFederationHttpBinding:
- It supports federated security.
- It helps in implementing federation which is the ability to flow and share identities across multiple enterprises for authentication and authorization.
- It supports WS-Federation protocol.
5. NetTcpBinding:
- It provides secure and reliable binding environment from .Net to .Net cross machine communication.
- It uses the TCP protocol and provides support for security, transaction and reliability.
- By default, it creates communication stack using WS-ReliableMessaging protocol for reliability.
6. NetNamedPipeBinding:
- It provides secure and reliable binding environment for on-machine cross process communication.
- It uses NamedPipe protocol.
- It provides full support for SOAP security, transaction and reliability.
7. NetMsmqBinding:
- It provides secure and reliable queued communication for cross-machine environment.
- It is provided by using MSMQ as transport.
- It enables for disconnected operations, failure isolation and load leveling.
8. NetPeerTcpBinding:
- It provides a secure binding for peer-to-peer environment and network applications.
- It uses TCP protocol for communication.
- It provides full support for SOAP security, transaction and reliability.
9. MsmqIntegrationBinding:
- It is provided by the MsmqIntegrationBinding class.
- It offers support to communicate with existing systems that communicate via MSMQ.
|