WCF - net.pipe vs net.tcp vs http bindings

I am new to WCF and would like to know the differences / advantages / limitations / etc of each of the following bindings:

net.pipe net.tcp http 

Support scenarios of when to use each binding and other examples are welcome.

+53
wcf wcf-binding
Apr 19 '09 at 16:46
source share
3 answers

Although it is not very convenient to provide specific use cases, here is a link from MSDN that lists all the functions for bindings.

http://msdn.microsoft.com/en-us/library/ms730879.aspx

Here is a decent flow chart that can help you choose between.

Flowchart

Source: http://bloggingabout.net/blogs/dennis/archive/2006/12/01/WCF-Binding-decision-chart.aspx

Here is a good general article that I have used in the past.

http://mkdot.net/blogs/dejan/archive/2008/03/31/wcf-binding-decision.aspx (or here in the return path if the link no longer works for you).

+62
Apr 19 '09 at 17:14
source

net.pipe is fast and safe because your web service is not accessible from the network (as a rule, you will use net.pipe to quickly interact with the Windows service).

http, you will use it for compatibility reasons, if your web service does not exceed HTTP, Silverlight or Flash cannot use it (because the browser filters non-http packets, as the firewall does).

net.tcp, a little faster because your soap message is not wrapped inside an HTTP request, but you cannot call your web service using RIA technology, and some firewalls will drop your message.

+49
Apr 19 '09 at 17:14
source

The Windows Communication Foundation (WCF) is an environment for creating services that process XML messages. WCF allows you to send messages using different transport protocols (for example, HTTP, TCP, and MSMQ) and use different XML representations (such as text, binary, or MTOM, which are commonly called message encoding in WCF.

If you want to host many WCF services on one computer and want them to use shared memory for communication, use named pipe => net.pipe, and then use tcp to communicate with WCF services on different computers.

The nettcp binding configuration focuses on creating a channel stack that will work better in Windows environments, giving you a great option to replace your various remote COM + and .NET investments.

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

+12
Apr 19 '09 at 17:00
source



All Articles