WCF Series Channels and Bindings: Part 1


In this article we will be discussing WCF Channels and Bindings.

Clients and Services communicate by passing messages.

The mechanism they use to communicate is a channel stack, which is made up of channels.

WCF Series Channels and Bindings

The Protocol Channels are responsible for configuring the messages to be sent from the client side to the server side or from the server to the client. 


Protocol channels consists of the Transaction Channel, Reliable Messaging Protocol, and Security Protocols. For example, if the call is a part of the Transaction then the Transaction protocol is responsible for configuring the message to participate in the Transaction.

Similarly for the Reliable Messaging Protocol and the Security Protocols they are responsible for configuring the messages for taking part in Reliable Messaging and Security.

These protocols are all optional. You need not use these protocols. For example, you need not have the Security settings. The BasicHttpBinding in WCF does not have security settings. This is the Default Binding.

The Transport channels are responsible for transporting the messages.

The Client sends the message as XML, the message reaches the message encoder and then the message encoder converts the messages to byte format for transporting.

The Transport Protocol then comes into the picture. It is responsible for transporting the messages.

The same process is followed on the server side. The messages, when transferred on the server side, are in Byte format. The messages are then converted into XML format.

Finally after passing through various protocols, the XML will reach the service and then the service will read the XML and know what is it the Client is asking for.

If the Service sends a message back the process reverses.

Bindings:

Lets see what Bindings are:

ChnBndWCF2.gif

The next is Binding elements:

WCF Series Channels and Bindings

Let's also learn about Binding properties.

WCF Series Channels and Bindings

In the next post I will try to give some code examples on Properties and Bindings.


Similar Articles