In this series of articles, we will discuss the major features of WCF:
- WCF (1), Basics --- this article
- WCF (2), Contracts in Various Types
- WCF (3), Bindings and Channel Stack
- WCF (4), RIA Service
Introduction
We will discuss WCF major features in the following order:
- What: WCF
- WCF Service
- WCF Host
- WCF Client
- Why: WCF
- WCF = Webservice + .Net remoting + MSMQ + COM+
- Fundamentals of WCF
- EndPoint of WCF: A + B + C
- Address
- Binding
- Contract
- Hosting
- Self Hosting
- IIS
- WAS hosting (Windows Process Activation Service)
A: What WCF is
Windows Communication Foundation (WCF) is a framework for building
service-oriented applications to send data as
asynchronous messages from one service endpoint to another, where
- Service
endpoint --- hosted by IIS,
or in an application.
- Client endpoint --- to requests data from a service endpoint.
- Messages --- can be as simple as a single character or word sent as XML, or as complex as a stream of binary data.
WCF is basically used to create a distributed and interoperable Application. WCF Applications came into the picture in .Net 3.0 Framework. It includes three parts:
- WCF Service : What is the service and what it is providing.
- WCF Service Host: Where is the Service hosted.
- WCF Service Client: Who is the client of the Service.
B: Why WCF
Why we need WCF Applications
Suppose, you have two clients- one wants to use a Web Service, which sends data over the network, using Http protocol and want reply in XML format, so we will create a Web Service.
The other wants to send the data, using Web Service over the network, using TCP protocol and replying in binary format, then we need to implement a remote Web service with TCP protocol (the following graph shows the situation).
For this situation, we need to create two different Services for two different clients, while using WCF will solve this problem with one single service consumed by two different clients- either they want same protocol or a different protocol. We specify the protocol name in an endpoint attribute of the Web Service (the following graph shows the WCF solution).









Join the conversation! Your thoughts help the community grow.