net.pipe vs. net.tcp vs. http Bindings

徘徊边缘 提交于 2019-11-28 15:20:52
Joe Doyle

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).

net.pipe, fast and secure because your web service is not accessible from the network (typically, you will use net.pipe to interact with a windows service easily).

http, you will use it for interoperability reason, if your web service is not over HTTP, silverlight or flash cannot use it (because the browser filter non-http packets, as a firewall does).

net.tcp, is a bit faster because your soap message is not wrapped inside a HTTP request, but you cannot invoke your webservice with a RIA technology, and some firewall will drop your message.

Windows Communication Foundation (WCF) is a framework for building services that process XML messages. WCF allows you to transmit messages using different transport protocols (such as HTTP, TCP, and MSMQ) and using different XML representations (such as text, binary, or MTOM, which is commonly referred to as the message encoding in WCF.

If you want to host many WCF Services on one machine and want them to use shared memory for their communication, use a named pipe=>net.pipe, and then use tcp for the communication to WCF Services on different machines.

Configuration of nettcp binding focuses on creating a channel stack that will perform better in Windows environments, giving you a great option for replacing your various COM+ and .NET remoting investments.

BasicHttpBinding was designed for scenarios where interoperability is of utmost importance. As a result, BasicHttpBinding uses HTTP for the transport and text for the message encoding.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!