SlideShare a Scribd company logo
WCF (Windows
Communication
Foundation)
 Windows Communication Foundation (Code named Indigo) is a
programming platform and runtime system for building,
configuring and deploying network-distributed services.
 It is the latest service oriented technology; Interoperability is
the fundamental characteristics of WCF. It is unified
programming model provided in .NET Framework 3.0. WCF is a
combined features of Web Service, Remoting, MSMQ and COM+.
WCF provides a common platform for all .NET communication.
WCF (Windows Communication Foundation)
Advantages:
 WCF is interoperable with other services when compared to .Net
Remoting, where the client and service have to be .Net.
 WCF services provide better reliability and security in compared
to ASMX web services.
 In WCF, there is no need to make much change in code for
implementing the security model and changing the binding.
Small changes in the configuration will make your requirements.
 WCF has integrated logging mechanism, changing the
configuration file settings will provide this functionality. In other
technology developer has to write the code.
Disadvantage:
 Making right design for your requirement is little bit difficult.
Difference between WCF and Web service:
 Web service is a part of WCF. WCF offers much more flexibility
and portability to develop a service when comparing to web
service.
 Hosting: Web service can be hosted in IIS while WCF can be
hosted in IIS, windows activation service, Self-hosting, Windows
service.
 Operation: One-way, Request- Response are the different
operations supported in web service while in WCF along with
the above mentioned Duplex operation is also supported.
 Transports: Webservices can be accessed through HTTP while
in case of WCF it can also be accessed through TCP, Named
pipes, MSMQ,P2P, Custom apart from HTTP.
 Protocols: For webservices Security protocol is used while for
WCF along with Security Reliable messaging, Transactions are
also used.
Fundamental concepts in WCF:
 Endpoints: WCF Service is a program that exposes a collection
of Endpoints. Each Endpoint is a portal for communicating with
the world. All the WCF communications are take place through
end point. End point consists of three components.
 Example:
<services>
<services name=“ServiceName”
behaviourConfiguration=“BehaviourName”>
<endpoint
address=http://localhost:8090/MyService/ServiceName.svc
contract=“ContractName” binding=“wsHTTPBinding” />
</service>
</services>
Binding and Behavior:
 Simple definition for Binding describes how the client will
communicate with service.
 Example - Binding:
<services>
<services name=“ServiceName”
behaviourConfiguration=“BehaviourName”>
<endpoint address=http://localhost:8090/MyService/ServiceName.svc
contract=“ContractName” binding=“wsHTTPBinding” />
<endpoint
address=net.tcp://localhost:8090/MyService/ServiceName.svc
contract=“ContractName” binding=“netTCPBinding” />
</service>
</services>
 Example - Behaviour:
<services>
<services name=“ServiceName” behaviourConfiguration=“BehaviourName”>
<endpoint address=http://localhost:8090/MyService/ServiceName.svc
contract=“ContractName” binding=“wsHTTPBinding” />
</service>
</services>
<behaviours>
<ServiceBehaviours>
<behavior name=“BehaviourName” >
<serviceMetadata httpGetEnabled=“True”/>
<serviceDebug includeExceptionDetailInFaults="true“/>
</behaviours>
</ServiceBehaviours>
</behaviours>
Contracts and Service Host:
 In WCF, all services are exposed as contracts. Contract is a
platform-neutral and standard way of describing what the
service does. Mainly there are four types of contracts available in
WCF:
 Service Contract: Service contracts describe the operation that
service can provide.
 Data Contract: Data contract describes the custom data type
which is exposed to the client. This defines the data types, that
are passed to and from service.
 Message Contract: Default SOAP message format is provided by
the WCF runtime for communication between Client and service.
If it is not meeting your requirements then we can create our
own message format. This can be achieved by using Message
Contract attribute.
 Fault Contract: Fault Contract provides documented view for error occurred
in the service to client. This helps us to easy identity, what error has occurred.
 Service Host object is in the process of hosting the WCF service and
registering endpoints. It loads the service configuration endpoints, apply the
settings and start the listeners to handle the incoming request.
//Creating uri for the hosting the service
Uri uri = new Uri("http://localhost/CategoryService");
//Creating the host object for MathService
ServiceHost host = new ServiceHost(typeof(CategoryService), uri);
//Adding endpoint to the Host object
host.AddServiceEndpoint(typeof(ICategoryService),new WSHttpBinding(), uri);
host.Open(); //Hosting the Service
Console.WriteLine("Waiting for client invocations");
Console.ReadLine();
host.Close();
Message and Channel:
 Message: WCF Message is the unit of data exchange between
client and service. It consists of several parts, including a body
and headers.
 Channels: Channels are the core abstraction for sending
message to and receiving message from an Endpoint. Broadly
we can categories channels as:
 Transport Channels: Handles sending and receiving message
from network. Protocols like HTTP, TCP name pipes and MSMQ.
 Protocol Channels: Implements SOAP based protocol by
processing and possibly modifying message. e.g. WS-Security
and WS-Reliability.
WCF (Windows Communication Foundation)

More Related Content

What's hot (20)

PPT
WCF
Vishwa Mohan
 
PPTX
10 Tricks and Tips for WCF
Barry Dorrans
 
PPTX
Windows Communication Foundation (WCF) Service
Sj Lim
 
PPT
Interoperability and Windows Communication Foundation (WCF) Overview
Jorgen Thelin
 
PPT
Wcf architecture overview
Arbind Tiwari
 
PPT
introduction to Windows Comunication Foundation
redaxe12
 
PPT
WCF And ASMX Web Services
Manny Siddiqui MCS, MBA, PMP
 
PDF
Beginning with wcf service
Binu Bhasuran
 
PDF
Building RESTful Services with WCF 4.0
Saltmarch Media
 
PPTX
Introduction to WCF
ybbest
 
PPTX
WCF for begineers
Dhananjay Kumar
 
DOC
WCF tutorial
Abhi Arya
 
PPTX
Windows Communication Foundation (WCF) Best Practices
Orbit One - We create coherence
 
PPT
Session 1: The SOAP Story
ukdpe
 
PPTX
1. WCF Services - Exam 70-487
Bat Programmer
 
PPTX
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio
 
PPT
Web services, WCF services and Multi Threading with Windows Forms
Peter Gfader
 
PPT
Session 1 Shanon Richards-Exposing Data Using WCF
Code Mastery
 
PPTX
Enjoying the Move from WCF to the Web API
Kevin Hazzard
 
DOCX
Top wcf interview questions
tongdang
 
10 Tricks and Tips for WCF
Barry Dorrans
 
Windows Communication Foundation (WCF) Service
Sj Lim
 
Interoperability and Windows Communication Foundation (WCF) Overview
Jorgen Thelin
 
Wcf architecture overview
Arbind Tiwari
 
introduction to Windows Comunication Foundation
redaxe12
 
WCF And ASMX Web Services
Manny Siddiqui MCS, MBA, PMP
 
Beginning with wcf service
Binu Bhasuran
 
Building RESTful Services with WCF 4.0
Saltmarch Media
 
Introduction to WCF
ybbest
 
WCF for begineers
Dhananjay Kumar
 
WCF tutorial
Abhi Arya
 
Windows Communication Foundation (WCF) Best Practices
Orbit One - We create coherence
 
Session 1: The SOAP Story
ukdpe
 
1. WCF Services - Exam 70-487
Bat Programmer
 
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio
 
Web services, WCF services and Multi Threading with Windows Forms
Peter Gfader
 
Session 1 Shanon Richards-Exposing Data Using WCF
Code Mastery
 
Enjoying the Move from WCF to the Web API
Kevin Hazzard
 
Top wcf interview questions
tongdang
 

Viewers also liked (11)

PPTX
Windows Communication Foundation
Tunku Abdul Rahman College
 
PPTX
Advanced WCF
Jack Spektor
 
PPS
Wcf Transaction Handling
Gaurav Arora
 
PPTX
Wcf for the web developer
Codecamp Romania
 
PPTX
The Full Power of ASP.NET Web API
Eyal Vardi
 
PPT
WCF 4.0
Eyal Vardi
 
PPTX
WCF Security, FSec
Ante Gulam
 
PPTX
ASP.NET Mvc 4 web api
Tiago Knoch
 
PPTX
Advanced WCF Workshop
Ido Flatow
 
PDF
REST - Representational State Transfer
Peter R. Egli
 
PPTX
Web API or WCF - An Architectural Comparison
Adnan Masood
 
Windows Communication Foundation
Tunku Abdul Rahman College
 
Advanced WCF
Jack Spektor
 
Wcf Transaction Handling
Gaurav Arora
 
Wcf for the web developer
Codecamp Romania
 
The Full Power of ASP.NET Web API
Eyal Vardi
 
WCF 4.0
Eyal Vardi
 
WCF Security, FSec
Ante Gulam
 
ASP.NET Mvc 4 web api
Tiago Knoch
 
Advanced WCF Workshop
Ido Flatow
 
REST - Representational State Transfer
Peter R. Egli
 
Web API or WCF - An Architectural Comparison
Adnan Masood
 
Ad

Similar to WCF (Windows Communication Foundation) (20)

PPTX
WCjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
OmkarTalkar1
 
PPT
DotNet_WindowsCommunicationFoundation.ppt
jeyap77755
 
PPTX
web programming
sakthibalabalamuruga
 
PDF
WCF Interview Questions By Scholarhat PDF
Scholarhat
 
PPS
WCF (Windows Communication Foundation_Unit_01)
Prashanth Shivakumar
 
PPT
Dot Net Training Wcf Dot Net35
Subodh Pushpak
 
PPT
WFC_DotNetWindowsCommunicationFoundation.ppt
jeyap77755
 
PPT
Windows Communication Foundation
David Truxall
 
PPTX
A presentation on WCF & REST
Santhu Rao
 
PPTX
Windows Communication Foundation
Vijay Krishna Parasi
 
PPTX
Learn WCF at ASIT
ASIT
 
PPT
WINDOWS COMMUNICATION FOUNDATION
Deepika Chaudhary
 
PDF
Advantage of WCF Over Web Services
Siva Tharun Kola
 
PPT
WCFPresentation.ppt WCFPresentation.ppt WCFPresentation.ppt
yatakonakiran2
 
PPTX
Understanding Web Services by software outsourcing company india
Jignesh Aakoliya
 
PDF
Wcf faq
Rajoo Jha
 
PPTX
Windows communication foundation ii
Swamy Gowtham
 
PPTX
Web services
aspnet123
 
PPT
Service Oriented Development With Windows Communication Foundation 2003
Jason Townsend, MBA
 
WCjffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
OmkarTalkar1
 
DotNet_WindowsCommunicationFoundation.ppt
jeyap77755
 
web programming
sakthibalabalamuruga
 
WCF Interview Questions By Scholarhat PDF
Scholarhat
 
WCF (Windows Communication Foundation_Unit_01)
Prashanth Shivakumar
 
Dot Net Training Wcf Dot Net35
Subodh Pushpak
 
WFC_DotNetWindowsCommunicationFoundation.ppt
jeyap77755
 
Windows Communication Foundation
David Truxall
 
A presentation on WCF & REST
Santhu Rao
 
Windows Communication Foundation
Vijay Krishna Parasi
 
Learn WCF at ASIT
ASIT
 
WINDOWS COMMUNICATION FOUNDATION
Deepika Chaudhary
 
Advantage of WCF Over Web Services
Siva Tharun Kola
 
WCFPresentation.ppt WCFPresentation.ppt WCFPresentation.ppt
yatakonakiran2
 
Understanding Web Services by software outsourcing company india
Jignesh Aakoliya
 
Wcf faq
Rajoo Jha
 
Windows communication foundation ii
Swamy Gowtham
 
Web services
aspnet123
 
Service Oriented Development With Windows Communication Foundation 2003
Jason Townsend, MBA
 
Ad

More from ipower softwares (12)

PPTX
Website Security
ipower softwares
 
PPTX
jQuery Mobile
ipower softwares
 
PPTX
Entity Framework
ipower softwares
 
PPTX
Angular JS
ipower softwares
 
PPTX
Big Data
ipower softwares
 
PPTX
Big Data
ipower softwares
 
PPTX
Big Data
ipower softwares
 
PPTX
Media Query
ipower softwares
 
PPTX
Phone Gap
ipower softwares
 
PPT
Windows phone 8 (mvvm)
ipower softwares
 
PPTX
Mvc 4
ipower softwares
 
Website Security
ipower softwares
 
jQuery Mobile
ipower softwares
 
Entity Framework
ipower softwares
 
Angular JS
ipower softwares
 
Media Query
ipower softwares
 
Phone Gap
ipower softwares
 
Windows phone 8 (mvvm)
ipower softwares
 

Recently uploaded (20)

PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PDF
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
PDF
Is Framer the Future of AI Powered No-Code Development?
Isla Pandora
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PPTX
Library_Management_System_PPT111111.pptx
nmtnissancrm
 
PPTX
From spreadsheets and delays to real-time control
SatishKumar2651
 
PPTX
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
PDF
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
Is Framer the Future of AI Powered No-Code Development?
Isla Pandora
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Library_Management_System_PPT111111.pptx
nmtnissancrm
 
From spreadsheets and delays to real-time control
SatishKumar2651
 
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 

WCF (Windows Communication Foundation)

  • 2.  Windows Communication Foundation (Code named Indigo) is a programming platform and runtime system for building, configuring and deploying network-distributed services.  It is the latest service oriented technology; Interoperability is the fundamental characteristics of WCF. It is unified programming model provided in .NET Framework 3.0. WCF is a combined features of Web Service, Remoting, MSMQ and COM+. WCF provides a common platform for all .NET communication.
  • 4. Advantages:  WCF is interoperable with other services when compared to .Net Remoting, where the client and service have to be .Net.  WCF services provide better reliability and security in compared to ASMX web services.  In WCF, there is no need to make much change in code for implementing the security model and changing the binding. Small changes in the configuration will make your requirements.  WCF has integrated logging mechanism, changing the configuration file settings will provide this functionality. In other technology developer has to write the code.
  • 5. Disadvantage:  Making right design for your requirement is little bit difficult.
  • 6. Difference between WCF and Web service:  Web service is a part of WCF. WCF offers much more flexibility and portability to develop a service when comparing to web service.  Hosting: Web service can be hosted in IIS while WCF can be hosted in IIS, windows activation service, Self-hosting, Windows service.  Operation: One-way, Request- Response are the different operations supported in web service while in WCF along with the above mentioned Duplex operation is also supported.  Transports: Webservices can be accessed through HTTP while in case of WCF it can also be accessed through TCP, Named pipes, MSMQ,P2P, Custom apart from HTTP.
  • 7.  Protocols: For webservices Security protocol is used while for WCF along with Security Reliable messaging, Transactions are also used.
  • 8. Fundamental concepts in WCF:  Endpoints: WCF Service is a program that exposes a collection of Endpoints. Each Endpoint is a portal for communicating with the world. All the WCF communications are take place through end point. End point consists of three components.  Example: <services> <services name=“ServiceName” behaviourConfiguration=“BehaviourName”> <endpoint address=http://localhost:8090/MyService/ServiceName.svc contract=“ContractName” binding=“wsHTTPBinding” /> </service> </services>
  • 9. Binding and Behavior:  Simple definition for Binding describes how the client will communicate with service.  Example - Binding: <services> <services name=“ServiceName” behaviourConfiguration=“BehaviourName”> <endpoint address=http://localhost:8090/MyService/ServiceName.svc contract=“ContractName” binding=“wsHTTPBinding” /> <endpoint address=net.tcp://localhost:8090/MyService/ServiceName.svc contract=“ContractName” binding=“netTCPBinding” /> </service> </services>
  • 10.  Example - Behaviour: <services> <services name=“ServiceName” behaviourConfiguration=“BehaviourName”> <endpoint address=http://localhost:8090/MyService/ServiceName.svc contract=“ContractName” binding=“wsHTTPBinding” /> </service> </services> <behaviours> <ServiceBehaviours> <behavior name=“BehaviourName” > <serviceMetadata httpGetEnabled=“True”/> <serviceDebug includeExceptionDetailInFaults="true“/> </behaviours> </ServiceBehaviours> </behaviours>
  • 11. Contracts and Service Host:  In WCF, all services are exposed as contracts. Contract is a platform-neutral and standard way of describing what the service does. Mainly there are four types of contracts available in WCF:  Service Contract: Service contracts describe the operation that service can provide.  Data Contract: Data contract describes the custom data type which is exposed to the client. This defines the data types, that are passed to and from service.  Message Contract: Default SOAP message format is provided by the WCF runtime for communication between Client and service. If it is not meeting your requirements then we can create our own message format. This can be achieved by using Message Contract attribute.
  • 12.  Fault Contract: Fault Contract provides documented view for error occurred in the service to client. This helps us to easy identity, what error has occurred.  Service Host object is in the process of hosting the WCF service and registering endpoints. It loads the service configuration endpoints, apply the settings and start the listeners to handle the incoming request. //Creating uri for the hosting the service Uri uri = new Uri("http://localhost/CategoryService"); //Creating the host object for MathService ServiceHost host = new ServiceHost(typeof(CategoryService), uri); //Adding endpoint to the Host object host.AddServiceEndpoint(typeof(ICategoryService),new WSHttpBinding(), uri); host.Open(); //Hosting the Service Console.WriteLine("Waiting for client invocations"); Console.ReadLine(); host.Close();
  • 13. Message and Channel:  Message: WCF Message is the unit of data exchange between client and service. It consists of several parts, including a body and headers.  Channels: Channels are the core abstraction for sending message to and receiving message from an Endpoint. Broadly we can categories channels as:  Transport Channels: Handles sending and receiving message from network. Protocols like HTTP, TCP name pipes and MSMQ.  Protocol Channels: Implements SOAP based protocol by processing and possibly modifying message. e.g. WS-Security and WS-Reliability.