TechBubbles Microsoft Technology BLOG

How to choose right WCF binding?

Binding in WCF defines how clients can connect with your service. The base class for all bindings in WCF is System.ServiceModel.Channels.Binding. A Binding includes definition for WS-* protocols used, the message encoding and the transport protocol.

The available WCF Bindings are

  • wsHttpBinding
  • basicHttpBinding
  • netTcpBinding
  • netNamedPipeBinding
  • netMsmqBinding
  • wsDualHttpBinding

Consider the following scenarios when your are choosing the WCF Binding

  • Consider using wsHttpBinding when you need to support clients over the Internet.
  • Consider using basicHttpBinding when you want to expose your WCF service to legacy clients.
  • Consider using netTcpBinding when you want to support clients over the Intranet.
  • Consider using netNamedPipeBinding when you want to support WCF clients on same machine.
  • Consider using netMsmqBinding when supporting disconnected queued calls.
  • Consider using wsDualHttpBinding when you need to support bi-directional communication between WCF Service and WCF Client.

Custom Binding – You can create custom binding in WCF configuration file and select set of binding elements in order and these elements refer to the transaction, reliable message, security , encoding formats and transport protocol.  

Share this post :

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

1 Comment

  • […] Binding in WCF defines how clients can connect with your service. The base class for all bindings in WCF is System.ServiceModel.Channels.Binding. A Binding includes definition for WS-* protocols used, the message encoding and the transport protocol. The available WCF Bindings arewsHttpBindingbasicHttpBindingnetTcpBindingnetNamedPipeBindingnetMsmqBindingwsDualHttpBinding Consider the following scenarios when your are choosing the WCF BindingConsider using wsHttpBinding when you need to support clients…  .NET, WCF Read the full post on DotNetShoutout… […]

TechBubbles Microsoft Technology BLOG

Follow me

Archives

Tag Cloud