Fundamentals of Windows Communication Foundation
page 3 of 6
by Keyvan Nayyeri
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 32869/ 72


Channel is actually a bridge between a client and a service.  Messages can travel between clients and services through channels.  There are four main types of channels:

·         Simplex Input

·         Simplex Output

·         Request-Reply

·         Duplex

But how a channel can be created?  The first time when a message is going to be sent (only at this time) the client tries to create a channel on a service endpoint (you will read about it later in the next section) based on the type of channel that is required and an address.  If the service is listening on that address then a channel will be created.  Here there is a point: you do not have any channel until the first message is sent.  When communication between client and service ends, the channel will be destroyed.

A channel is a queue of some features that make up its properties, such as security, session or messaging pattern. There are different types of each feature available, but you must choose a compatible combination to be able to create a channel.  Here I describe these features.

Each channel type supports one, two or all (three) messaging patterns so you should be aware of channel characteristics to be able to use it for your aims.

Different transports can be used in WCF.  It is also possible to write a new transport but HTTP, TCP and MSMQ are the most common transports.  These transports have some characteristics so you have to choose a correct transport for your application.  For example, some transports provide better security features.

In addition to the security level that comes with transports, you can use SOAP message security and its authentication or authorization and other security mechanisms to improve security in your application.

It is possible to encode messages in a WCF application.  You can use pure text format or binary format to encode messages.  There are some built-in encoders, but you can write new encoders or extend them.

Reliable Sessions let you to have reliable messaging and it helps you to keep communication alive whenever something is lost.   Reliable Sessions also let you to have sessions.  Sessions keep states on services during several actions.

Interoperability of a channel makes it possible to open doors to other platforms and technologies.  Four types of interoperability are available in WCF.  Basic Profile is very simple and you saw it in traditional web services.  .NET interoperability needs .NET on the client and service, but provides some helpful features such as binary encoding.  MSMQ interoperability is a way to interoperate with other deployments of MSMQ.  The fourth and last interoperability that is very common is WS-*.  This interoperability opens doors for other platforms and can use WS-* protocols.  These protocols provide many important features such as security, transactional operations, reliability and service.

View Entire Article

User Comments

Title: afdsfaff   
Name: fdsf
Date: 2012-11-21 6:37:14 AM
Title: gg   
Name: gg
Date: 2012-11-21 6:36:44 AM
Title: xzcnbzx   
Name: jxncvjkn
Date: 2012-05-16 7:01:49 AM
Title: WCF   
Name: Gracy Pasca
Date: 2012-05-03 7:42:05 AM
It is very
Title: WCF   
Name: Chandru
Date: 2011-03-10 12:06:38 AM
simple and understandable for beginners and its hard to understand when new technology with prebuild modules so i recommends that you better given with an examples
Title: wcf   
Name: lakshmi
Date: 2010-12-22 7:29:10 AM
This is a very good article for learners
Title: wcf   
Name: suvarna
Date: 2010-12-22 7:26:33 AM
this is good article for beginners to understand
Title: Could you give an example for duplex pattern   
Name: Rosein
Date: 2010-08-25 7:38:24 AM
Firstly, thanks for article but could you give some examples for duplex pattern?
Somewhere on net I read an example for duplex as "Fax machine"
But, I couldn't understand cause it also gets a request and with this request it recieves the message to the place and also send a response that tels the message send successfully or not.
Title: wcf   
Name: Indra
Date: 2009-07-27 8:23:11 AM
pls be clear on sync and async
Title: can u clarify the where u have using content management in moss 2007   
Name: sreedhar verma
Date: 2009-02-21 7:30:53 AM
NOw i want explanation of content management
Title: what are the precations of masterpages   
Name: sreedhar verma
Date: 2009-02-21 7:29:15 AM
i observe the all concepts some what is more useful for all sharepoint developer.
Title: exllent   
Name: yangamuni prasad
Date: 2008-10-15 2:44:25 PM
It's nice article, everybody can understand this
Title: Good article   
Name: Amit Ravi
Date: 2008-10-11 7:01:41 AM
This is great article...especially for beginners.
But the asynchronous message exchange pattern is the Duplex pattern and not the Request/reply pattern which is synchronous.
Title: Asynchronous and asynchronous   
Name: Anubha
Date: 2008-09-28 5:44:34 PM
You mentioned about request-reply is asynchronous but i believe the explanation for asynchronous is wrong..please correct it else it is definitely confusing and incorrect info.. Thanks.
Title: Request-Reply pattern is Synchronous   
Name: Shan
Date: 2008-01-28 2:56:58 AM
You mentioned Request-Reply pattern is asnchronous but its waiting for response from service. So i believe this pattern is Synchronous one. Thanks for you Arthicle. Regards,Shan
Title: just some doubt   
Name: madhanMohan
Date: 2007-07-19 7:51:44 AM
Just one small doubt, In above article "Request-Reply" pattern is defined as "two way asynchronous messaging pattern" but down when explaining the same it is specified that after sending a request client should wait for the reply from service(which is Synchronous i believe bcz as far i know in Asynchronous messaging client need not wait for server/service reply and meanwhile client can continue with its business).

It would be great if you clarify me.


Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-05-22 7:41:15 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search