WCF - net.pipe vs. net.tcp vs. http Bindings
WCF - net.pipe vs. net.tcp vs. http Bindings
问题:
I'm new to WCF and would like to know the differences/advantages/limitations/etc of each of the following bindings:
net.pipe
net.tcp
http
Supporting scenarios on when to use each binding and other examples would be appreciated.
答案:
While not great for providing specific usage examples, here is a link from MSDN which lists all the features for the bindings.
http://msdn.microsoft.com/en-us/library/ms730879.aspx
Here is a decent flow chart that can help choosing between them as well.

Source: http://bloggingabout.net/blogs/dennis/archive/2006/12/01/WCF-Binding-decision-chart.aspx
Here is a good overall article I've used in the past.
http://mkdot.net/blogs/dejan/archive/2008/03/31/wcf-binding-decision.aspx (or here in the wayback machine if the link no longer works for you).
what's the difference between net.tcp and TCP protocol?
问题:
I am reading the < Learning WCF > by Michele Leroux Bustamante.
In this book, when it comes tonet.tcp protocol, the author just says TCP instead.
So what's the difference between net.tcp and the famous TCP protocol?
And as in net.msmq, net.pipe, what does the net prefix mean?
Many thanks.
回答:
net.tcp is simply the URI scheme used within Windows to identify endpoints that can be accessed using TCP.
Similarly, net.msmq and net.pipe, are the URI schemes to address endpoints that utilise the MSMQ protocol and Named Pipes protocol, respectively.
The net prefix on all three indicates that the URI scheme was devised solely for use on the Microsoft .NET platform and is not generally accepted in the wider internet. (Other URI schemes, such as httpand ftp have have generally accepted meanings and are therefore utilised within WCF without any prefix). The net prefix therefore serves as an warning bell that the associated endpoint will have limited/no interoperability with other applications that are not running on the .NET platform.
Example URIs:
net.tcp://localhost:7272
net.msmq://somemachine/publicQueue
net.pipe://machine.domain.com/somePipe
SIDEBAR: While MSMQ and Named Pipes are clearly Microsoft protocols and therefore a lack of interoperability is unsurprising, TCP is the foundation protocol of the internet and therefore, surely it's use in WCF should not be .NET specific?
Well, interoperability in WCF is already handled by SOAP and HTTP, which both run on top of TCP. If you want interoperability over TCP - use one of those protocols.
Microsoft was therefore looking to provide a communication alternative where performance, rather than interoperability, was the key objective. TCP was the logical choice, but TCP is a relatively low level protocol, which requires additional behavior and defaults to be implemented in order to work in a straight-forward manner for a messaging framework like WCF. In addition, there is no generally accepted URI scheme for TCP accessible resources and therefore Microsoft needed to invent one. Thus, net.tcp was born.
While the URIs themselves don't necessarily indicate exactly which binding to use, they do provide a hint. As per Simon Mourier's answer, the bindings currently available within WCF can be found here. So, for instance, a net.tcp address could indicate that NetTcpBinding, NetPeerTcpBinding, or NetTcpContextBinding is required.
WCF - net.pipe vs. net.tcp vs. http Bindings的更多相关文章
- WCF:如何将net.tcp协议寄宿到IIS
1 部署IIS 1.1 安装WAS IIS原本是不支持非HTTP协议的服务,为了让IIS支持net.tcp,必须先安装WAS(Windows Process Activation Service),即 ...
- [转]WCF:如何将net.tcp协议寄宿到IIS
本文转自:http://www.cnblogs.com/Gyoung/archive/2012/12/11/2812555.html 1 部署IIS 1.1 安装WAS IIS原本是不支持非HTTP协 ...
- wcf win7上使用net.tcp出现不支持协议问题解决
第一:iis绑定 net.tcp 808:* 第二:iis 应用中高级开启协议,添加net.tcp多协议逗号隔开 第三:开启各项服务 第四:执行 ServiceModReg.exe -r
- 关于wcf配置未启动net.tcp监控导致无法访问wcf
在服务里面启动NetTcpActivator和NetTcpPortSharing服务
- WCF入门教程1——WCF简要介绍
什么是WCF Windows Communication Foundation(WCF)是由微软开发的一系列支持数据通信的应用程序框架,可以翻译为Windows 通讯开发平台. 整合了原有的windo ...
- WCF全面解析学习(1)
SOA的基本概念和设计思想 SOA并不是仅仅采用Web服务的架构,Web服务只是一种实现SOA的理想技术手段.SOA依赖于开放的标准.SOA的一个目标是让不同的厂商开发的服务能够相互操作. SOA支持 ...
- 第三讲:WCF介绍(3)
代码 https://yunpan.cn/cPns5DkGnRGNs 密码:3913 前面我们通过一个小的例子,大概了解的WCF. 这里我们补充下 EndPoint 配置 A,B,C 中 ...
- 地址(Address)——统一资源表示(URI)——WCF学习笔记(2)
统一资源标识(URI) URI:Uniform Resource Identifier(统一资源标识),唯一地标识一个网络资源的同时也表示资源所处的位置的方式(资源访问所用的网络协议). URI结构: ...
- WCF简单教程
WCF是DotNet体系中很重要的一项技术,但是组内很多组员通过书籍自学的时候 感觉涉及面太广.配置文件太复杂,新名词太多.抓不到头绪,有感于此,决定进行一次组内技术培训,顺便把培训讲义整理到blog ...
随机推荐
- pageContext.request.contextPath
jsp:<c:set var="ctxStatic" value="${pageContext.request.contextPath}"/>嵌套d ...
- Cookies和Sseeion的选择
Cookies和Session都是用来记录个人信息 来保持页面状态 现在介绍些Cookies 的优点 1 把存储数据的压力分担到了客户端 ,这样服务器就少点压力 2 可以用来记录用户状态(如放入用户 ...
- 【原创】Linux编译内核
Linux 编译内核 大致分这几个步骤 1.准备编译工具.内核文件 2.开始编译 3.将编译好的新内核install进系统 4.查看是否成功. 一.准备好必备的库和内核文件 1.添加必备的编译 ...
- html5 canvas绘制圆形印章,以及与页面交互
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- 检查ftp备份数据完整性及短信告警的shell脚本
发布:thebaby 来源:net [大 中 小] 检查ftp备份数据完整性及短信告警的shell,有需要的朋友可以参考下. 该脚本实现如下的功能: 对远程备份到ftp服务器的数据完整性及 ...
- PHP - PHPExcel操作xls文件
读取中文的xls.csv文件会有问题,网上找了下资料,发现PHPExcel类库好用,官网地址:http://phpexcel.codeplex.com/ 1.读取xls文件内容 <?php // ...
- gulp最佳实践(包含js,css,html预编译,合并,压缩,浏览器自动刷新)
gulp是基于流的自动化构建工具官方网址:http://www.gulpjs.com.cn/ 一.安装需要的模块 1.新建package.json,输入下面的内容 { "name" ...
- WPF 得一些问题汇总
1.CallMethodAction <TextBox Height="30" Name="txtUserName" Width="160&qu ...
- SQLite批量插入,修改数据库 zt
SQLiteConnection sqConnection = dataProvider.GetDbConnection(); sqConnection.Open(); SQLiteCommand s ...
- 在ADS上由于volatile惹得祸
C语言关键字volatile是一个危险的东东,笔者再用ADS做S3C2440定时器中断实验就因为这个关键字出了错.出现错误情况的准确描述是:定义一个变量时没有用volatile关键字,而且紧接着whi ...