System-Provided Bindings

Bindings specify the communication mechanism to use when talking to an endpoint and indicate how to connect to an endpoint. A binding contains the following elements:

The protocol stack determines the security, reliability, and context flow settings to use for messages that are sent to the endpoint.

The transport determines the underlying transport protocol to use when sending messages to the endpoint, for example, TCP or HTTP.

The encoding determines the wire encoding to use for messages that are sent to the endpoint, for example, text/XML, binary, or Message Transmission Optimization Mechanism (MTOM).

This topic presents all of the system-provided Windows Communication Foundation (WCF) bindings. If none of these meets the exact criteria for your application, you can create a custom binding. For more information about creating custom bindings, see Custom Bindings.

A secure and interoperable binding that supports the WS-Federation protocol enables organizations that are in a federation to efficiently authenticate and authorize users.

Note:

Always select a binding that includes security. By default, all bindings except the <basicHttpBinding> element have security enabled. If you do not select a secure binding or disable security, be sure to protect your data in some other manner, such as storing in a secured data center or on an isolated network.

Note:

Never use duplex contracts with bindings that do not support security or that have security disabled unless you secure the data by some other means.

System-Provided Bindings

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.

A secure and interoperable binding that is suitable for non-duplex service contracts that enables SOAP headers to be used to exchange context.

The following table shows the features of each of the system-provided bindings. The bindings are found in the table columns; the features are listed in the rows and described in a second 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.

Binding

Interoperability

Security (Default)

Session(Default)

Transactions

Duplex

Encoding (Default)

Streaming(Default)

BasicHttpBinding

Basic Profile 1.1

(None), Transport, Message, Mixed

(None)

(None)

n/a

Text, (MTOM)

Yes

(buffered)

WSHttpBinding

WS

Transport, (Message), Mixed

(None), Reliable Session, Security Session

(None), Yes

n/a

(Text), MTOM

No

WSDualHttpBinding

WS

(Message), None

(Reliable Session), Security Session

(None), Yes

Yes

(Text), MTOM

No

WSFederationHttpBinding

WS-Federation

(Message), Mixed, None

(None), Reliable Session, Security Session

(None), Yes

No

(Text), MTOM

No

NetTcpBinding

.NET

(Transport), Message, None, Mixed

(Transport), Reliable Session, Security Session

(None), Yes

Yes

Binary

Yes

(buffered)

NetNamedPipeBinding

.NET

(Transport), None

None, (Transport)

(None), Yes

Yes

Binary

Yes

(buffered)

NetMsmqBinding

.NET

Message, (Transport), None

(None), Transport

None, (Yes)

No

Binary

No

NetPeerTcpBinding

Peer

(Transport)

(None)

(None)

Yes

No

MsmqIntegrationBinding

MSMQ

(Transport)

(None)

None, (Yes)

n/a

n/a

No

BasicHttpContextBinding

Basic Profile 1.1

(None), Transport, Message, Mixed

(None)

(None)

n/a

Text, (MTOM)

Yes

(buffered)

NetTcpContextBinding

.NET

(Transport), Message, None, Mixed

(Transport), Reliable Session, Security Session

(None), Yes

Yes

Binary

Yes

(buffered)

WebHttpBinding

.NET

(None), Transport, TransportCredentialOnly

(None)

(None), No

No

(Text)

No

WSHttpContextBinding

WS

Transport, (Message), Mixed

(None), Reliable Session, Security Session

(None), Yes

n/a

Text, (MTOM)

No

The following table explains the features listed in the previous table.

Feature

Description

Interoperability Type

Names the protocol or technology with which the binding ensures interoperation.

Security

Specifies how the channel is secured:

None: The SOAP message is not secured and the client is not authenticated.

Transport: Security requirements are satisfied at the transport layer.