Support us .Net Basics C# SQL ASP.NET ADO.NET MVC Slides C# Programs Subscribe Buy DVD

Part 21 - Bindings in WCF

Suggested Videos
Part 18 - Throwing fault exceptions from a WCF service
Part 19 - Creating and throwing strongly typed SOAP faults
Part 20 - Centralize exception handling in WCF



WCF service endpoint consists of 3 things
A - Address (Address where the WCF Service is available)
B - Binding (We will discuss this in more detail in this video)
C - Contract (Specifies what the service can do. For example, the service contract describes which operations the client can perform on the service)



So, what is a binding in a WCF service?
WCF binding defines how the client needs to communicate with the service. The WCF binding that you choose determines the following for the communication between the client and the service.
Transport Protocol (for example, HTTP, TCP, NamedPipe, MSMQ)
Message Encoding (for example, text/XML, binary, or (MTOM) Message Transmission Optimization Mechanism)
Protocols (for example, reliable messaging, transaction support)

In WCF there are several built-in bindings that we could use. The complete list can be found at the following MSDN link
http://msdn.microsoft.com/en-us/library/ms730879(v=vs.110).aspx

Depending on your application requirement, you pick the binding that best suit your needs. If you are not sure, which binding to use there is a flowchart at the following link that can be handy.
http://stackoverflow.com/questions/10849920/different-wcf-bindings-their-differences-and-compatibility-with-other-platforms

As WCF is very extensible, you can also create a custom binding and use it, if none of the system provided bindings suit your needs.

wcf tutorial

No comments:

Post a Comment

If you like this website, please share with your friends on facebook and Google+ and recommend us on google using the g+1 button on the top right hand corner.