What is Channel in WCF?

In Service oriented architecture there are two parties involved, Server and Client .Server and client communicate to each other via Messages. Message travels over the network. For communication; server and client must be agreed upon

  • Format of message
  • Protocol
  • Transport
  • Encoding of the message etc.

Channels are the responsible component of WCF for

  • Creation of consistent message
  • Transport of consistent message.
  • Conversion of Message in wire format


The main goal of Channel is to transform message to format understandable by the communication wire and compatible to both server and client and then transport the message over the wire in between client and server.


Essentially Channel has to decide about

  • Protocol used in the message
  • Encoding in the message
  • Message is reliable or not
  • Security of the message
  • Transaction of the message

Mainly channel performs two different types of task and on basis of task channel is of two types,


Transport channels are responsible to send and receive the message using a transport protocol. WCF supports HTTP, TCP, and MSMQ, Peer to Peer and Named Piped transport protocols.

Protocol channels are responsible to implement and support security, transaction and reliable messaging. These channels transform and modify the message to make it compatible to wire level.

In a communication there may be one or more than one transport and protocol channels. Collections of different channels are called as Channel Stack.

Different channel performs different tasks. For example one protocol channel can secure the message whereas another protocol channel can make message reliable.

In WCF architecture, transport channel always resides at the bottom of channel stack. A usual channel stack can be depicted as below,


WCF provides us many readymade channel stacks to do communication between service and client. This WCF provided channel stacks are known as Binding. One channel layer is defined by one Binding Element.


You are very much allowed to create your own channel stack if all WCF provided bindings are not meeting your requirement.

Transport protocol of service and client communicates to each other.


Transport channel converts messages into bytes or binary to send over the network. Encoding of messages is also done by the transport channels.

I hope you are having basic idea about channel now. Thanks for reading Smile

If you find my posts useful you may like to follow me on twitter http://twitter.com/debug_mode or may like Facebook page of my blog http://www.facebook.com/DebugMode.Net If you want to see post on a particular topic please do write on FB page or tweet me about that, I would love to help you.

10 responses to “What is Channel in WCF?”

  1. i understood perfactly. thank you mate! i hope for more about advance wcf topics

  2. Hi Dhananjay,

    The topics you posted on your site and c-sharpcorner , its Great!!!!!!!!!!!!!!!!!

    Please add me in your friend list and give me your valuable time , if its possible to talk with you on gtalk.

    Awaiting for your replay.

    Asha Bhatt

  3. Reblogged this on tuandom's Blog and commented:

  4. Nice article

  5. […] 关于Service channel, 查了一下,大概是这么个定义。有句话是这么说的: […]

  6. Hey Dhanu Bhai,

    your way of explanation was superb. Thank you very much !


  7. Excellent

  8. Really superb and very helpful.

    Thank you

  9. good explanation of channel stack. plz do an article about custom bindings…do they simply combine different predefined protocol channels and transport channel, or do they assume user custom implementation of certain channels.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com