WCF绑定(Binding)

一个Binding由一个有序的binding元素栈所组成,其中的每一个元素都指定了连接到ServiceEndpoint的一个方面。在这个栈中的最底两层都是必须要有的。最底下的一层是传输binding元素,在它之上是用于指定编码规范的binding元素。

一个Binding中的元素可以分为三类:协议、传输与编码, 它们分别可以指定如下信息:

  •  协议栈元素指定诸如安全性、可靠性、上下文流设置(context flow settins);
  • 传输中指定底层的传输协议,如TCP或是HTTP。
  • 编码中指定发送到ServiceEndpoint中的消息编码,如Text/XML, Binary或是MTOM。

WCF预定义了一些Binding,它们在互操作性(Interoperability), 安全性(Security), 是否支持会话(Session), 是否支持事务(Transactions)和是否为全双工(Duplex)上各有不同。

Binding Configuration Element Description

BasicHttpBinding

basicHttpBinding Element

A binding that is suitable for communicating with WS-Basic Profile conformant Web Services, for example, ASMX-based services. This binding uses HTTP as the transport and Text/XML as the default message encoding.

WSHttpBinding

wsHttpBinding Element

A secure and interoperable binding that is suitable for non-duplex service contracts.

WSDualHttpBinding

wsDualHttpBinding Element

A secure and interoperable binding that is suitable for duplex service contracts or communication through SOAP intermediaries.

WSFederationHttpBinding

wsFederationHttpBinding element

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

NetTcpBinding

netTcpBinding Element

A secure and optimized binding suitable for cross-machine communication between WCF applications.

Net NamedPipeBinding

netNamedPipeBinding Element

A secure, reliable, optimized binding that is suitable for on-machine communication between WCF applications.

NetMsmqBinding

netMsmqBinding Element

A queued binding that is suitable for cross-machine communication between WCF applications.

NetPeerTcpBinding

netPeerTcpBinding element

A binding that enables secure, multi-machine communication.

MsmqIntegrationBinding

msmqIntegrationBinding element

A binding that is suitable for cross-machine communication between an WCF application and existing MSMQ applications.

 

Binding Interoperability Security (Default) Session (Default) Transactions Duplex

BasicHttpBinding

Basic Profile 1.1

(None), Transport, Message,

None, (None)

(None)

n/a

WSHttpBinding

WS

Transport, (Message), Mixed

(None), Transport, Reliable Session

(None), Yes

n/a

WSDualHttpBinding

WS

(Message)

(Reliable Session)

(None), Yes

Yes

WSFederationHttpBinding

WS-Federation

(Message)

(None), Reliable Session

(None), Yes

No

NetTcpBinding

.NET

(Transport), Message

Reliable Session, (Transport)

(None), Yes

Yes

NetNamedPipeBinding

.NET

(Transport)

None, (Transport)

(None), Yes

Yes

NetMsmqBinding

.NET

Message, (Transport), Both

(None)

(None), Yes

No

NetPeerTcpBinding

Peer

(Transport)

(None)

(None)

Yes

MsmqIntegrationBinding

MSMQ

(Transport)

(None)

(None), Yes

n/a

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值