原文地址:http://www.cnblogs.com/jams742003/archive/2010/01/13/1646379.html

Binding描述了哪些层面的信息

一个Binding包含着丰富的信息,每种信息都描述了服务端和客户端交互过程中的一方面,如下表所示,Binding描述了这些层面的信息:

层次

备注说明

Transactions(事务)

TransactionFlowBindingElement,用于指定事务流程

Reliability(信赖)

ReliableSessionBindingElement,用于指定对会话方式

Security(安全)

SecurityBindingElement,指定安全方式

Encoding(编码)

Text, Binary, MTOM, Custom,指定数据传输格式

Transport(传输)

TCP, Named Pipes, HTTP, HTTPS, MSMQ, Custom,指定传输方式

选择正确的Binding

Binding是可以自定义实现的,可WCF框架已经为我们实现了足够多的Binding,供我们来选择,

如下表所示:

Binding名称

Configuration Element

描述

BasicHttpBinding

basicHttpBinding

一个指定用符合基本网络服务规范通讯的binding,它用http进行传输,数据格式为text/xml

WSHttpBinding

wsHttpBinding

一个安全的通用的binding,但它不能在deplex中使用

WSDualHttpBinding

wsDualHttpBinding

一个安全的通用的binding,但能在deplex中使用

WSFederationHttpBinding

wsFederationHttpBinding

一个安全的通用的支持WSF的binding,能对用户进行验证和授权

NetTcpBinding

netTcpBinding

在wcf应用程序中最适合跨机器进行安全通讯的binding

NetNamedPipeBinding

netNamedPipeBinding

在wcf应用程序中最适合本机进行安全通讯的binding

NetMsmqBinding

netMsmqBinding

在wcf应用程序中最适合跨机器进行安全通讯的binding,并且支持排队

NetPeerTcpBinding

netPeerTcpBinding

一个支持安全的,多机交互的binding

MsmqIntegrationBinding

msmqIntegrationBinding

一个用于wcf与现有msmq程序进行安全通讯的binding

下面的表格分别删除了上表中的Binding在互操作性(Interoperability), 安全性(Security), 是否支持会话(Session), 是否支持事务(Transactions)和是否为全双工(Duplex)上不同。

Bingding

Interoperability

Security

Session

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

·BasicHttpBinding: 最简单的绑定类型,通常用于 Web Services。使用 HTTP 协议,Text/XML 编码方式。
·WSHttpBinding: 比 BasicHttpBinding 更加安全,通常用于 non-duplex 服务通讯。
·WSDualHttpBinding: 和 WSHttpBinding 相比,它支持 duplex 类型的服务。
·WSFederationHttpBinding: 支持 WS-Federation 安全通讯协议。
·NetTcpBinding: 效率最高,安全的跨机器通讯方式。
·NetNamedPipeBinding: 安全、可靠、高效的单机服务通讯方式。
·NetMsmqBinding: 使用消息队列在不同机器间进行通讯。
·NetPeerTcpBinding: 使用 P2P 协议在多机器间通讯。
·MsmqIntegrationBinding: 使用现有的消息队列系统进行跨机器通讯。如 MSMQ。

仅作参考。

片段摘自:

http://www.rainsts.net/article.asp?id=439

http://www.cnblogs.com/jillzhang/archive/2008/02/03/1063406.html

博客园大道至简

http://www.cnblogs.com/jams742003/

转载请注明:博客园

WCF—Binding的更多相关文章

  1. Adapter as a WCF Binding - In Depth

    WCF LOB Adapter SDK surfaces an adapter as a custom WCF Binding.  A WCF Bindingcorresponds to the “H ...

  2. WCF Binding

    <Programming WCF Services>有一幅图也能说明各自的特征: 下面的图给出了我们选择Binding的方式

  3. WCF binding的那些事!!!

    原文地址:http://www.cnblogs.com/Anima0My/archive/2008/04/16/1156146.html WCF中常用的binding方式: BasicHttpBind ...

  4. WCF学习系列一【WCF Interview Questions-Part 1 翻译系列】

    http://www.topwcftutorials.net/2012/08/wcf-faqs-part1.html WCF Interview Questions – Part 1 This WCF ...

  5. WCF学习系列三--【WCF Interview Questions – Part 3 翻译系列】

    http://www.topwcftutorials.net/2012/10/wcf-faqs-part3.html WCF Interview Questions – Part 3 This WCF ...

  6. wcf 同时支持webhttp 和 引用方式

    wcf 实现参考 http://www.cnblogs.com/mingmingruyuedlut/p/4223116.html 兼容两种方式 1.修改服务端webconfig <system. ...

  7. WCF传输1-你是否使用过压缩或Json序列化?

    1.当遇到需要传输大量数据时,怎么样传输数据? 2.压缩数据有哪几种常见的方式? 问题1解答:通过压缩来传输数据 问题2解答: (1)WCF自带的压缩方式 (2)自定义WCF binding进行压缩 ...

  8. 关于WCF服务在高并发情况下报目标积极拒绝的异常处理

    最近弄了个wcf的监控服务,偶尔监控到目标服务会报一个目标积极拒绝的错误.一开始以为服务停止了,上服务器检查目标服务好好的活着.于是开始查原因. 一般来说目标积极拒绝(TCP 10061)的异常主要是 ...

  9. WCF服务在高并发情况下报目标积极拒绝的异常处理 z

    http://www.cnblogs.com/kklldog/p/5037006.html wcf的监控服务,偶尔监控到目标服务会报一个目标积极拒绝的错误.一开始以为服务停止了,上服务器检查目标服务好 ...

随机推荐

  1. Android屏幕图标尺寸规范

    http://blog.csdn.net/dyllove98/article/details/9174229 . 程序启动图标:ldpi (120 dpi)小屏mdpi (160 dpi)中屏hdpi ...

  2. retain two decimal digits.

    package kju.o; import static kju.print.Printer.*; import java.text.*; class MathDemo { public static ...

  3. Ubuntu系统配置日志/var/log/message

    ubuntu系统默认不生成/var/log/messages文件,有时候想查看相关日志就很不方便,于是我们可以设置使系统生成此文件. 1.先安装 apt-get install rsyslog2.用v ...

  4. app图标和启动页设置

    弄了一下午,终于把iOS中图标的设置和启动页的设置弄明白了.我想以后再也不会浑了. 进入正题: 一:apple 1).iPhone4s 3.5寸屏,也就是640*960,但在模拟器上正常用的是320* ...

  5. C# 泛型2

    我们在编写程序时,经常遇到两个模块的功能非常相似,只是一个是处理int数据,另一个是处理string数据,或者其他自定义的数据类型,但我们没有办法,只能分别写多个方法处理每个数据类型,因为方法的参数类 ...

  6. Java实现Linux下服务器程序的双守护进程

    作者:Vinkn 来自http://www.cnblogs.com/Vinkn/ 一.简介 现在的服务器端程序很多都是基于Java开发,针对于Java开发的Socket程序,这样的服务器端上线后出现问 ...

  7. 网站开发常用jQuery插件总结(三)拖拽插件gridster

    1.gridster插件功能 实现类似于win8 磁贴拖拽的功能 2.gridster官方地址 http://gridster.net/ 在官方的网站上也有插件的帮助和实例,但是按照官方的说明,我在本 ...

  8. dedecms织梦二级菜单的实现方法

    首先,复制代码: 程序代码 {dede:channelartlist typeid='top' cacheid='channelsonlist'} {dede:channel type='son' n ...

  9. Device.js——检测设备平台、操作系统的Javascript 库

    http://segmentfault.com/a/1190000000373735 Device.js 是一个可以让你检测设备的平台,操作系统和方向 JavaScript 库,它会自动在 <h ...

  10. windows live writer 下载及安装

    windowslive writer下载地址: http://www.microsoft.com/en-us/download/details.aspx?id=8621(不知为啥,这里我无法下载)或 ...