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 http
and 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 ...
随机推荐
- Android应用程序消息处理机制笔记
看老罗的Android源码情景分析学习的时候,边抄边理解再总结.希望能为面试提供点帮助吧. 1.Android应用程序是通过消息来驱动,Android应用程序每一个线程在启动时,都可以首先在内部创建一 ...
- 1_使用Java文件的并发写
为了实现,并发写操作,首先实验一下在本地情况下, 将一个文件切分成若干个 文件块 然后将文件块 通过多线程的并发的方式写入到指定目录下的文件中. 下面是简单的试着实现代码,暂时 先进行记录一下: im ...
- ora01033 oracle正在初始化或关闭
toad连数据库报错: ORA-01033: ORACLE initialization or shutdown in progress 解决方法: 1)开始-运行-cmd 2)命令行中输入SQLPL ...
- hpple 简单使用
最近项目使用到hpple,简单说一下使用方式,做做笔记 let responseData = response as! NSData let utf8Html = responseData.strin ...
- cyark - 数字方舟(看侣行第三季时发现的)
数字方舟 Ben Kacyra
- Android版多线程下载器核心代码分享
首先给大家分享多线程下载核心类: package com.example.urltest; import java.io.IOException; import java.io.InputStream ...
- 一次ora-1113 记录
记录博客园的第一天,今天在电脑前发呆,突然感觉自己记忆越来越差,近年来随着工作力度的加强,感觉自己越来越力不从心,问题重复的出现.感觉自己应该去记录点什么了,随选择了用写博客的方式记录一下.第一天先记 ...
- WORDPRESS开发(一)自定义页面显示分类目录
第一步:自定义一个页面,如index.php 第二步:打开index.php文件,引用wp-blog-header.php文件 require('wp-blog-header.php'); 第三步使用 ...
- 读取xml文件(可执行文件根目录debug)
xml文件格式如下 <?xml version="1.0" encoding="utf-8" ?> <root> <appKey& ...
- 【转】PFILE和SPFILE介绍
原文:http://blog.sina.com.cn/s/blog_77bba23901017xcl.html 一.PFILE Pfile(Parameter File,参数文件)是基于文本格式的参数 ...