Binding describes how client will communicate with service. There are different protocols available for the WCF to communicate to the Client. You can mention the protocol type based on your requirements.
A binding has several characteristics, including the following:
- Transport - Defines the base protocol to be used like HTTP, Named Pipes, TCP, and MSMQ are some type of protocols.
- Encoding (Optional) - Three types of encoding are available-Text, Binary, or Message Transmission Optimization Mechanism (MTOM). MTOM is an interoperable message format that allows the effective transmission of attachments or large messages (greater than 64K).
- Protocol(Optional) - Defines information to be used in the binding such as Security, transaction or reliable messaging capability.
The following table gives some list of protocols supported by WCF binding.
Binding |
Description |
BasicHttpBinding |
Basic Web service communication. No security by default. |
WSHttpBinding |
Web services with WS-* support. Supports transactions. |
WSDualHttpBinding |
Web services with duplex contract and transaction support. |
WSFederationHttpBinding |
Web services with federated security. Supports transactions. |
MsmqIntegrationBinding |
Communication directly with MSMQ applications. Supports transactions. |
NetMsmqBinding |
Communication between WCF applications by using queuing. Supports transactions. |
NetNamedPipeBinding |
Communication between WCF applications on same computer. Supports duplex contracts and transactions |
NetPeerTcpBinding |
Communication between computers across peer-to-peer services. Supports duplex contracts |
NetTcpBinding |
Communication between WCF applications across computers. Supports duplex contracts and transactions
|