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. |
|
NetNamedPipeBinding |
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 |
WCF绑定(Binding)的更多相关文章
- WCF - 绑定
从整个基础架构来看 WCF可分为服务模型层和信道层 模型层提供了一个统一的可扩展的编程模型 而信道层提供了对请求信息的接收和处理 而作为WCF通信的三要素之一的绑定 是它实现了组成整个信道层的信道栈 ...
- WCF绑定netTcpBinding寄宿到IIS
继续沿用上一篇随笔中WCF服务类库 Wettery.WcfContract.Services WCF绑定netTcpBinding寄宿到控制台应用程序 服务端 添加WCF服务应用程序 Wettery. ...
- (二)WCF的Binding模型
上篇博客对WCF中的基础知识进行了介绍,先从概念上知道了WCF的一些理论,在abc模型中B是Binding,WCF为我们提供了多种绑定机制,我们先从了解各种绑定机制开始,只有知道之后才能在实践中更好的 ...
- WCF绑定类型选择
WCF绑定类型选择 发布日期:2010年12月10日星期五 作者:EricHu 在开发WCF程序时,如何选择一个适合的绑定对于消息传输的可靠性,传输模式是否跨进程.主机.网络,传输模式的支持. ...
- 游戏框架设计中的。绑定binding。。。命令 command 和消息message 以及MVVM
游戏框架设计中的.绑定binding...命令 command 和消息message
- WPF绑定(Binding)(4)
什么是绑定(Binding)? 在winform中, 我们常常会用到各种类型的赋值, 例如: button1.Text="Hello"; label.Text="Hell ...
- WCF 绑定(Binding)
绑定包含多个绑定元素 ,它 们描述了所有绑定要求 .可以创建自定义绑定 ,也可以使用下表中的其中一个预定义绑定 : 不同的绑定支持不同的功能.以Ws开头的绑定独立于平台 ,支持 Web服务规范. 以 ...
- WCF绑定和行为在普通应用和SilverLight应用一些对比
本文版权归mephisto和博客园共有,欢迎转载,但须保留此段声明,并给出原文链接,谢谢合作. 阅读目录 介绍 绑定 普通应用和SilverLight应用区别 本文版权归mephisto和博客园共有, ...
- WCF 绑定的选择
选自<WCF服务编程中文版> 第一章 WCF基础 绑定服务之间的通信方式是多种多样的,有多种可能的通信模式.包括:同步的请求/ 应答(Request/Reply)消息,或者异步的“即发即弃 ...
随机推荐
- 并发编程:生产消费模型、死锁与Rlock、线程、守护线程、信号量、锁
一.生产者消费者模型1 二.生产者消费者模型2 三.守护线程 四.常用方法 五.启动线程的另一种方式 六.锁 七.锁死 八.死锁 九.单个锁能不能死锁 十.信号旗 一.生产者消费者模型1 import ...
- Hadoop_06_Hadoop的HDFS的概念和特性
1.HDFS的概念和特性 1.1. 首先,它是一个文件系统,用于存储文件,通过统一的命名空间——目录树来定位文件 1.2. 它是分布式的,由很多服务器联合起来实现其功能,集群中的服务器有各自的角色:重 ...
- P_C_Brules
最小孔径10mil,最小线宽4mil,最小安全间距4mil.这个是一般厂家能做的.嘉立创为5mil. 1.xiankuan . 一般设为10mil.嘉立创多层板3.5mil,单双面5mil 电流的考量 ...
- js实现购物车数量的增加与减少,js实现购物车数量的自增与自减
js实现购物车数量的增加与减少,js实现购物车数量的自增与自减 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E ...
- Django :执行 python manage.py makemigrations 时报错 TypeError: __init__() missing 1 required positional argument: 'on_delete'
原因 执行命令 python manage.py makemigrations 报错 TypeError: __init__() missing 1 required positional argum ...
- HTML实现背景颜色的渐变
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- PyQt打包可执行文件
1.安装pyinstaller pip install pyinstaller 2.pyinstaller打包 pyinstaller -F -w xxxx.py -F:生成可执行文件 -w:不显示命 ...
- BZOJ 1441: Min exgcd
根据 $exgcd$ 的定理,这种方程的最小解就是 $gcd$. Code: #include <cstdio> #include <algorithm> using name ...
- 基于node、webpack、搭建一个koa服务器
1.首先需要node(去官网下载) 2.见一个文件夹 比如koa cmd——r cd koa文件 3.npm init 4.安装webpack (本地安装 ...
- Sql Server 基本使用
一.登录sql server数据库 1.若需要连接本机数据库服务器,服务器名可以采用“local”.“.”“本机Ip”. 2.在连接sql server 之前,确保sql server服务已经启动,如 ...