Bindings specify the communication mechanism to use when talking to an endpoint and indicate how to connect to an endpoint. Bindings consist of elements that define how the Windows Communication Foundation (WCF) channels are layered up to provide the required communication features. A binding contains three types of elements:
This topic presents all of the system-provided Windows Communication Foundation (WCF) bindings. If none of these meets the exact requirements for your application, you can create a binding using the CustomBinding class. For more information about creating custom bindings, see Custom Bindings.
The following bindings are shipped with WCF.
BasicHttpBinding
<basicHttpBinding>
A binding that is suitable for communicating with WS-Basic Profile conformant Web services, for example, ASP.NET Web services (ASMX)-based services. This binding uses HTTP as the transport and text/XML as the default message encoding.
WSHttpBinding
<wsHttpBinding>
A secure and interoperable binding that is suitable for non-duplex service contracts.
WS2007HttpBinding
<ws2007HttpBinding>
A secure and interoperable binding that provides support for the correct versions of the Security, ReliableSession, and TransactionFlow binding elements.
WSDualHttpBinding
<wsDualHttpBinding>
A secure and interoperable binding that is suitable for duplex service contracts or communication through SOAP intermediaries.
WSFederationHttpBinding
<wsFederationHttpBinding>
A secure and interoperable binding that supports the WS-Federation protocol, enabling organizations that are in a federation to efficiently authenticate and authorize users.
WS2007FederationHttpBinding
<ws2007FederationHttpBinding>
A secure and interoperable binding that derives from WS2007HttpBinding and supports federated security.
NetTcpBinding
<netTcpBinding>
A secure and optimized binding suitable for cross-machine communication between WCF applications.
NetNamedPipeBinding
<netNamedPipeBinding>
A secure, reliable, optimized binding that is suitable for on-machine communication between WCF applications.
NetMsmqBinding
<netMsmqBinding>
A queued binding that is suitable for cross-machine communication between WCF applications.
NetPeerTcpBinding
<netPeerTcpBinding>
A binding that enables secure, multi-machine communication.
WebHttpBinding
<webHttpBinding>
A binding used to configure endpoints for WCF Web services that are exposed through HTTP requests instead of SOAP messages.
MsmqIntegrationBinding
<msmqIntegrationBinding>
A binding that is suitable for cross-machine communication between a WCF application and existing Message Queuing (also known as MSMQ) applications.
The next table shows some of the key features each of the system-provided bindings provided. The bindings are listed in the first column and information regarding the features is described in the table. The following table provides a key for the binding abbreviations used. To select a binding, determine which column satisfies all of the row features you need.
Basic Profile 1.1
(None), Transport, Message, Mixed
None, (None)
(None)
n/a
WS
None, Transport, (Message), Mixed
(None), Transport, Reliable Session
(None), Yes
WS-Security, WS-Trust, WS-SecureConversation, WS-SecurityPolicy
None, (Message)
(Reliable Session)
Yes
WS-Federation
None, (Message), Mixed
(None), Reliable Session
No
.NET
None, (Transport), Message,
Mixed
Reliable Session, (Transport)
None,
(Transport)
None, (Transport)
None, Message, (Transport), Both
Peer
None, Message, (Transport), Mixed
MSMQ
The following table explains the features found in the previous table.
Interoperability Type
Names the protocol or technology with which the binding ensures interoperation.
Security
Specifies how the channel is secured:
Session
Specifies whether this binding supports session contracts.
Transactions
Specifies whether transactions are enabled.
Duplex
Specifies whether duplex contracts are supported. Note this feature requires support for Sessions in the binding.
Streaming
Specifies whether the message streaming is supported.