WCF stands for Windows Communication Foundation. It is basically used to create a distributed and interoperable Application. WCF Applications came into the picture in .Net 3.0 Framework. This is a framework, which is used for creating Service oriented Applications. You can send the data asynchronously from one end point to another. I think you all know about Web Service and are thinking, if we already have Web Services and accessing on a remote basis then why did WCF come into picture?
Distributed Application
It means those Applications, which do not run only on
single system but can run on multiple systems, which are connected over the network. For example, a Web Service that can consume by different clients.
Interoperable
Example
Web Service is interoperable because it can be consume from any client, either it is from Java or .NET but on a remote basis, it is not interoperable because if we want to consume any remote service from the client, client Application must be developed in .NET.
Why we need WCF Applications
In this, I am explaining why we need WCF Application, if we already have Web Service.
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.
Problem
The problem is in the example, shown above, we need to create two different Services for two different clients .WCF is solving this problem and one single service can be 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.
WCF
There are three parts of WCF Application or we can say it consists of three things, which are-
- WCF Service : What is the service and what it is providing.
- WCF Service host: Where is the Service hosted.
- Service Client: Who is the client of the Service.
Message
Message is the communication unit, as it is in the form of an envelop. The transmission of the data from the client to Service and Service to client is being done by envelop. The envelop or message has the sections, given below-
- Header
- Body
By default Header and fault are disabled but Body is responsible for the data transmission or data exchanging.
Header is useful to send some data from client to Server. Suppose we want to send user name from each request but don’t want to send it by an argument, we can easily add it into message header.
Endpoint
Endpoint is a very essential part of WCF Application, as it describes the address of Web Service from where a user can receive and send the message. It also specifies the communication mechanism of how the message will be sent or received.
End point consists of three things, which are A,B,C and each of them have a question mark.- Address (Where?)
- Binding (how?)
- Contract (What?)
Endpoint = A + B+ C
Address is the address of WCF Service, where the Service is hosted? It gives the exact URL of Web Service, where the Service hosts the pattern of URL, which is-
Scheme://domain/[:port]/path
net.tcp://localhost:1234/MyService
http://localhost:1234/MyService
Binding
Contract
Hosting
Hosting is the important thing in WCF Application and it makes WCF Application different from other distributed Applications. WCF supports following types of hosting-
- IIS Hosting
- Self hosting
- WAS hosting
SOAP stands for Simple Object Access Protocol. It is not a transport protocol but an XML based message protocol.

Shital BhosalePosted Jul 1, 2021, 5:18 AM
Plz help mi sir
Shital BhosalePosted Jul 1, 2021, 5:18 AM
I want to save my desktop applications data in the server (online).now my application run properly on my machine and lan also...but i want to attach database online...so how ? And what can i do for that?
Shital BhosalePosted Jul 1, 2021, 5:16 AM
Hlo sir, i want to ask one question to you?
ANURAG JADHAVPosted Nov 29, 2018, 11:28 PM
Hi, This is very useful article but when we can see next article of Binding and contract?
Asit SinghPosted Oct 14, 2016, 1:41 PM
Thanks
Saurabh KumarPosted Sep 15, 2016, 4:29 AM
Good Info