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.
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

WCF
WCFWCF
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF10 Tricks and Tips for WCF
10 Tricks and Tips for WCF
Barry Dorrans
 
Windows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) ServiceWindows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) Service
Sj Lim
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewJorgen Thelin
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overview
Arbind Tiwari
 
introduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationintroduction to Windows Comunication Foundation
introduction to Windows Comunication Foundation
redaxe12
 
WCF And ASMX Web Services
WCF And ASMX Web ServicesWCF And ASMX Web Services
WCF And ASMX Web Services
Manny Siddiqui MCS, MBA, PMP
 
Beginning with wcf service
Beginning with wcf serviceBeginning with wcf service
Beginning with wcf serviceBinu Bhasuran
 
Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0
Saltmarch Media
 
Introduction to WCF
Introduction to WCFIntroduction to WCF
Introduction to WCF
ybbest
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorial
Abhi Arya
 
Session 1: The SOAP Story
Session 1: The SOAP StorySession 1: The SOAP Story
Session 1: The SOAP Story
ukdpe
 
1. WCF Services - Exam 70-487
1. WCF Services - Exam 70-4871. WCF Services - Exam 70-487
1. WCF Services - Exam 70-487Bat Programmer
 
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio
 
Web services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsWeb services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows Forms
Peter Gfader
 
Session 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFSession 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCF
Code Mastery
 
Enjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web APIEnjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web API
Kevin Hazzard
 
Top wcf interview questions
Top wcf interview questionsTop wcf interview questions
Top wcf interview questions
tongdang
 

What's hot (20)

WCF
WCFWCF
WCF
 
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF10 Tricks and Tips for WCF
10 Tricks and Tips for WCF
 
Windows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) ServiceWindows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) Service
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) Overview
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overview
 
introduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationintroduction to Windows Comunication Foundation
introduction to Windows Comunication Foundation
 
WCF And ASMX Web Services
WCF And ASMX Web ServicesWCF And ASMX Web Services
WCF And ASMX Web Services
 
Beginning with wcf service
Beginning with wcf serviceBeginning with wcf service
Beginning with wcf service
 
Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0
 
Introduction to WCF
Introduction to WCFIntroduction to WCF
Introduction to WCF
 
WCF for begineers
WCF  for begineersWCF  for begineers
WCF for begineers
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorial
 
Windows Communication Foundation (WCF) Best Practices
Windows Communication Foundation (WCF) Best PracticesWindows Communication Foundation (WCF) Best Practices
Windows Communication Foundation (WCF) Best Practices
 
Session 1: The SOAP Story
Session 1: The SOAP StorySession 1: The SOAP Story
Session 1: The SOAP Story
 
1. WCF Services - Exam 70-487
1. WCF Services - Exam 70-4871. WCF Services - Exam 70-487
1. WCF Services - Exam 70-487
 
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
 
Web services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsWeb services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows Forms
 
Session 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFSession 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCF
 
Enjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web APIEnjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web API
 
Top wcf interview questions
Top wcf interview questionsTop wcf interview questions
Top wcf interview questions
 

Viewers also liked

Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
Tunku Abdul Rahman College
 
Wcf Transaction Handling
Wcf Transaction HandlingWcf Transaction Handling
Wcf Transaction Handling
Gaurav Arora
 
Wcf for the web developer
Wcf for the web developerWcf for the web developer
Wcf for the web developer
Codecamp Romania
 
The Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIThe Full Power of ASP.NET Web API
The Full Power of ASP.NET Web API
Eyal Vardi
 
WCF 4.0
WCF 4.0WCF 4.0
WCF 4.0
Eyal Vardi
 
WCF Security, FSec
WCF Security, FSecWCF Security, FSec
WCF Security, FSecAnte Gulam
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
Tiago Knoch
 
Advanced WCF Workshop
Advanced WCF WorkshopAdvanced WCF Workshop
Advanced WCF Workshop
Ido Flatow
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State Transfer
Peter R. Egli
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
Adnan Masood
 

Viewers also liked (11)

Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
 
Advanced WCF
Advanced WCFAdvanced WCF
Advanced WCF
 
Wcf Transaction Handling
Wcf Transaction HandlingWcf Transaction Handling
Wcf Transaction Handling
 
Wcf for the web developer
Wcf for the web developerWcf for the web developer
Wcf for the web developer
 
The Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIThe Full Power of ASP.NET Web API
The Full Power of ASP.NET Web API
 
WCF 4.0
WCF 4.0WCF 4.0
WCF 4.0
 
WCF Security, FSec
WCF Security, FSecWCF Security, FSec
WCF Security, FSec
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
Advanced WCF Workshop
Advanced WCF WorkshopAdvanced WCF Workshop
Advanced WCF Workshop
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State Transfer
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
 

Similar to WCF (Windows Communication Foundation)

Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Subodh Pushpak
 
WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)
Prashanth Shivakumar
 
Understanding Web Services by software outsourcing company india
Understanding Web Services by software outsourcing company indiaUnderstanding Web Services by software outsourcing company india
Understanding Web Services by software outsourcing company india
Jignesh Aakoliya
 
Basics of WCF and its Security
Basics of WCF and its SecurityBasics of WCF and its Security
Basics of WCF and its Security
Mindfire Solutions
 
web programming
web programmingweb programming
web programming
sakthibalabalamuruga
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication FoundationMahmoud Tolba
 
Web services
Web servicesWeb services
Web servicesaspnet123
 
Web programming
Web programmingWeb programming
Web programming
sowfi
 
Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...
Abdul Khan
 
SOA & WCF
SOA & WCFSOA & WCF
SOA & WCF
Dev Raj Gautam
 
Advantage of WCF Over Web Services
Advantage of WCF Over Web ServicesAdvantage of WCF Over Web Services
Advantage of WCF Over Web Services
Siva Tharun Kola
 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & RESTSanthu Rao
 
Wcf faq
Wcf faqWcf faq
Wcf faq
Rajoo Jha
 
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use CasesAn In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
Tien Nguyen
 
Wcf and its features
Wcf and its featuresWcf and its features
Wcf and its featuresGulshan Sam
 
Java web services
Java web servicesJava web services
Java web services
kumar gaurav
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
Vijay Krishna Parasi
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
VijayapriyaP1
 
WINDOWS COMMUNICATION FOUNDATION
WINDOWS COMMUNICATION FOUNDATIONWINDOWS COMMUNICATION FOUNDATION
WINDOWS COMMUNICATION FOUNDATION
Deepika Chaudhary
 

Similar to WCF (Windows Communication Foundation) (20)

Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35
 
WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)
 
Understanding Web Services by software outsourcing company india
Understanding Web Services by software outsourcing company indiaUnderstanding Web Services by software outsourcing company india
Understanding Web Services by software outsourcing company india
 
Basics of WCF and its Security
Basics of WCF and its SecurityBasics of WCF and its Security
Basics of WCF and its Security
 
web programming
web programmingweb programming
web programming
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
 
Web services
Web servicesWeb services
Web services
 
Web programming
Web programmingWeb programming
Web programming
 
Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...
 
SOA & WCF
SOA & WCFSOA & WCF
SOA & WCF
 
Advantage of WCF Over Web Services
Advantage of WCF Over Web ServicesAdvantage of WCF Over Web Services
Advantage of WCF Over Web Services
 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & REST
 
Wcf faq
Wcf faqWcf faq
Wcf faq
 
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use CasesAn In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
An In-Depth Comparison of WebSocket and SignalR: Pros, Cons, and Use Cases
 
Wcf and its features
Wcf and its featuresWcf and its features
Wcf and its features
 
Java web services
Java web servicesJava web services
Java web services
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
 
WINDOWS COMMUNICATION FOUNDATION
WINDOWS COMMUNICATION FOUNDATIONWINDOWS COMMUNICATION FOUNDATION
WINDOWS COMMUNICATION FOUNDATION
 
WFC #1
WFC #1WFC #1
WFC #1
 

More from ipower softwares (12)

Website Security
Website SecurityWebsite Security
Website Security
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Entity Framework
Entity FrameworkEntity Framework
Entity Framework
 
Angular JS
Angular JSAngular JS
Angular JS
 
Big Data
Big DataBig Data
Big Data
 
Big Data
Big DataBig Data
Big Data
 
Big Data
Big DataBig Data
Big Data
 
Media Query
Media QueryMedia Query
Media Query
 
Phone Gap
Phone GapPhone Gap
Phone Gap
 
WPF
WPFWPF
WPF
 
Windows phone 8 (mvvm)
Windows phone 8 (mvvm)Windows phone 8 (mvvm)
Windows phone 8 (mvvm)
 
Mvc 4
Mvc 4Mvc 4
Mvc 4
 

Recently uploaded

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 

Recently uploaded (20)

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 

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.
  • 3.
  • 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.