SlideShare ist ein Scribd-Unternehmen logo
1 von 16
WCF
INTRODUCTION
• The latest Service Oriented Technology.
• Interoperability is the fundamental characteristic.
• Provides common platform for all .NET communication.
• Successor to all message distribution technologies.
• Used by developers to build Service Oriented Applications.
WCF vs. WEBSERVICE
      Features                   Web Service                                    WCF
                                                             It can be hosted in IIS, windows activation
Hosting          It can be hosted in IIS
                                                             service, Self-hosting, Windows service
                 One-way, Request- Response are the          One-Way, Request-Response, Duplex are
Operation        different operations supported in web       different type of operations supported in
                 service                                     WCF
                 XML 1.0, MTOM(Message Transmission
Encoding                                                     XML 1.0, MTOM, Binary, Custom
                 Optimization Mechanism), DIME, Custom

                                                             Can be accessed through HTTP, TCP,
Transports       Can be accessed through HTTP, TCP, Custom
                                                             Named pipes, MSMQ,P2P, Custom

Protocols        Security                                    Security, Reliable messaging, Transactions
END POINT
• WCF exposes collection of end points.
• End point is a portal for communicating with the world.
• End point consists of three components (ABC – Address(where?)-Binding(how?)-Contract(what?)).
       Address – It is a unique URL identifies the location of the service.
                   http://localhost:8080/ServiceSamples/MyService
                   [Transport]:// [Machine or Domain]: [Port number]/ [Path]
       Binding – It specifies the protocol to access the service and also an encoding method used to format
                  the message contents.
                  E.g. basicHttpBinding, wsHttpBinding . . etc.
       Contract - Collection of operation that specifies what the endpoint will communicate with outside
                  world.
END POINT USING
CONFIG FILE:
• WCF Endpoint can be created using configuration file.
END POINT USING
CODE:
• WCF Endpoint can be created using code.
BINDING
• Binding will describe how client will communicate with service.
• There are 9 standard bindings in WCF

       Name                                Transport           Encoding     Interoperable
       BasicHttpBinding                    HTTP/HTTPS          Text, MTOM   Yes
       NetTcpBinding                       TCP                 Binary       No
       NetPeerTcpBinding                   P2P                 Binary       No
       NetNamedPipeBinding                 IPC                 Binary       No
       WSHttpBinding                       HTTP/HTTPS          Text, MTOM   Yes
       WSFederationHttpBinding             HTTP/HTTPS          Text, MTOM   Yes
       WSDualHttpBinding                   HTTP                Text, MTOM   Yes
       NetMsmqBinding                      MSMQ                Binary       No
       MsmqIntegrationBinding              MSMQ                Binary       Yes
CHOOSING A BINDING:
• Have to know about client(WCF or NON-WCF) and service(WCF or NON-WCF) to choose binding.
BINDING CONFIGURATION USING CONFIG FILE:


• We have to add bindingConfiguration tag to
the end point section.


• We have to name a customized section in the
binding section of the config file.
BINDING CONFIGURATION
PROGRAMMATICALLY:
CONTRACTS
• Defines the Structure and Behavior of WCF Service.
• The 3 core contracts are:
     1.   Service Contract - Describe the operation that service can provide.
     2.   Data Contract - Describes the custom data type which is exposed to the client.
     3.   Message Contract – Describes the message format for communication during
          runtime.
SERVICE CONTRACT
• Services are group of operations, both classes and interfaces are used for grouping operations.
• Operations are defined by creating a method and marking it with OperationContractAttribute attribute.
• Service contract is defined by marking a class or interface that group operations(methods) with
ServiceContractAttribute attribute.


DATA CONTRACT
• It defines the data types that are passed to and from the WCF service.
• It defines how data is serialized and deserialized.
• By using Data Contracts we can make client to aware of custom created data types.
MESSAGE CONTRACT
 • Message is the packet data which contains information.
 • Message Contract is used to customize the message as per the requirement.
 • WCF uses SOAP(Simple Object Access Protocol) Message format for communication.
 • Message contract can be applied to type using MessageContract attribute.
 • Custom Header and Body can be included to message using 'MessageHeader' and 'MessageBodyMember‘
 attribute.

FAULT CONTRACT
 • WCF provides the option to handle and convey the error message to client from service using SOAP Fault
 contract.
 • Fault Contract provides documented view for error accorded in the service to client.
 • service defines its fault contracts using the FaultContractAttribute.
HOSTING A WCF
SERVICE
• WCF service cannot exist on its own, it has to be hosted using a host process.
• There are mainly four different ways of hosting the WCF service.
      1.   IIS Hosting
      2.   Self Hosting
      3.   Windows Activation Service
      4.   Windows Service
IIS HOSTING                   SELF HOSTING                 WAS                          WINDOWS SERVICE
 IIS automatically launches   WCF provides the user to     Windows Activation           WCF Service starts when
the host process when it      host the service in any      service is a system          the system starts. All
gets the first client         application.                 service available with       versions of windows
request.                                                   Windows vista and            support WCF hosting.
                                                           windows server 2008, It
                                                           is also available with IIS
                                                           7.0
It uses the IIS features      Developer is responsible     Hosting WCF in               Process life time of the
such as process recycling,    for providing and            Activation service takes     service can be controlled
idle shutdown, process        managing the life cycle of   many advantages such         by Service Control
health monitoring and         the host process.            as process recycling,        Manager for windows
message based activation.                                  isolation, idle time         service
                                                           management and
                                                           common configuration
                                                           system.
It will only support HTTP     It will support almost all   It supports Http, TCP        It will support almost all
protocol.                     types of protocols.          and named pipes.             types of protocols.
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt?

REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5Rob Windsor
 
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF10 Tricks and Tips for WCF
10 Tricks and Tips for WCFBarry Dorrans
 
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 overviewArbind Tiwari
 
Windows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) ServiceWindows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) ServiceSj Lim
 
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.0Saltmarch Media
 
Beginning with wcf service
Beginning with wcf serviceBeginning with wcf service
Beginning with wcf serviceBinu Bhasuran
 
Introduction to WCF
Introduction to WCFIntroduction to WCF
Introduction to WCFybbest
 
introduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationintroduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationredaxe12
 
Session 1: The SOAP Story
Session 1: The SOAP StorySession 1: The SOAP Story
Session 1: The SOAP Storyukdpe
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorialAbhi Arya
 
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 & SOAPUIAdvancio
 
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 FormsPeter 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 WCFCode Mastery
 
Top wcf interview questions
Top wcf interview questionsTop wcf interview questions
Top wcf interview questionstongdang
 
Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003Jason Townsend, MBA
 

Was ist angesagt? (20)

REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5
 
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF10 Tricks and Tips for WCF
10 Tricks and Tips for WCF
 
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
 
Windows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) ServiceWindows Communication Foundation (WCF) Service
Windows Communication Foundation (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
 
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
 
Introduction to WCF
Introduction to WCFIntroduction to WCF
Introduction to WCF
 
introduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationintroduction to Windows Comunication Foundation
introduction to Windows Comunication Foundation
 
WCF for begineers
WCF  for begineersWCF  for begineers
WCF for begineers
 
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
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorial
 
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
 
Top wcf interview questions
Top wcf interview questionsTop wcf interview questions
Top wcf interview questions
 
Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003
 

Ähnlich wie Wcf

Web service, wcf, web api
Web service, wcf, web apiWeb service, wcf, web api
Web service, wcf, web apiAbdeliDhankot
 
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
 
Difference between wcf and asp.net web api
Difference between wcf and asp.net web apiDifference between wcf and asp.net web api
Difference between wcf and asp.net web apiUmar Ali
 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & RESTSanthu Rao
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication FoundationMahmoud Tolba
 
Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Subodh Pushpak
 
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 indiaJignesh Aakoliya
 
Basics of WCF and its Security
Basics of WCF and its SecurityBasics of WCF and its Security
Basics of WCF and its SecurityMindfire Solutions
 
Windows communication foundation ii
Windows communication foundation iiWindows communication foundation ii
Windows communication foundation iiSwamy Gowtham
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-SignalingOleg Levy
 
SOA Difference FAQs
SOA Difference FAQsSOA Difference FAQs
SOA Difference FAQsUmar Ali
 

Ähnlich wie Wcf (20)

Web service, wcf, web api
Web service, wcf, web apiWeb service, wcf, web api
Web service, wcf, web api
 
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...
 
Web Service Security
Web Service SecurityWeb Service Security
Web Service Security
 
web programming
web programmingweb programming
web programming
 
Difference between wcf and asp.net web api
Difference between wcf and asp.net web apiDifference between wcf and asp.net web api
Difference between wcf and asp.net web api
 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & REST
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
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 Net35
 
Wcf Overview
Wcf OverviewWcf Overview
Wcf Overview
 
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
 
Web services
Web servicesWeb services
Web services
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
 
Basics of WCF and its Security
Basics of WCF and its SecurityBasics of WCF and its Security
Basics of WCF and its Security
 
07 advanced topics
07 advanced topics07 advanced topics
07 advanced topics
 
Wcf faq
Wcf faqWcf faq
Wcf faq
 
Windows communication foundation ii
Windows communication foundation iiWindows communication foundation ii
Windows communication foundation ii
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
 
SOA Difference FAQs
SOA Difference FAQsSOA Difference FAQs
SOA Difference FAQs
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Introduction to WAP
Introduction to WAPIntroduction to WAP
Introduction to WAP
 

Mehr von Anand Kumar Rajana (13)

Interface Vs Abstact
Interface Vs AbstactInterface Vs Abstact
Interface Vs Abstact
 
Anand's Leadership Assessment
Anand's Leadership AssessmentAnand's Leadership Assessment
Anand's Leadership Assessment
 
Understanding linq
Understanding linqUnderstanding linq
Understanding linq
 
Rhino Mocks
Rhino MocksRhino Mocks
Rhino Mocks
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
The Seven Pillars Of Asp.Net
The Seven Pillars Of Asp.NetThe Seven Pillars Of Asp.Net
The Seven Pillars Of Asp.Net
 
What Do You Mean By NUnit
What Do You Mean By NUnitWhat Do You Mean By NUnit
What Do You Mean By NUnit
 
Sql Server 2012 Installation..
Sql Server 2012 Installation..Sql Server 2012 Installation..
Sql Server 2012 Installation..
 
Json
JsonJson
Json
 
Jquery Ajax
Jquery AjaxJquery Ajax
Jquery Ajax
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
jQuery Ajax
jQuery AjaxjQuery Ajax
jQuery Ajax
 
J Query Introduction And JQuery Selectors
J Query Introduction And JQuery SelectorsJ Query Introduction And JQuery Selectors
J Query Introduction And JQuery Selectors
 

Kürzlich hochgeladen

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Wcf

  • 1. WCF
  • 2. INTRODUCTION • The latest Service Oriented Technology. • Interoperability is the fundamental characteristic. • Provides common platform for all .NET communication. • Successor to all message distribution technologies. • Used by developers to build Service Oriented Applications.
  • 3. WCF vs. WEBSERVICE Features Web Service WCF It can be hosted in IIS, windows activation Hosting It can be hosted in IIS service, Self-hosting, Windows service One-way, Request- Response are the One-Way, Request-Response, Duplex are Operation different operations supported in web different type of operations supported in service WCF XML 1.0, MTOM(Message Transmission Encoding XML 1.0, MTOM, Binary, Custom Optimization Mechanism), DIME, Custom Can be accessed through HTTP, TCP, Transports Can be accessed through HTTP, TCP, Custom Named pipes, MSMQ,P2P, Custom Protocols Security Security, Reliable messaging, Transactions
  • 4. END POINT • WCF exposes collection of end points. • End point is a portal for communicating with the world. • End point consists of three components (ABC – Address(where?)-Binding(how?)-Contract(what?)).  Address – It is a unique URL identifies the location of the service. http://localhost:8080/ServiceSamples/MyService [Transport]:// [Machine or Domain]: [Port number]/ [Path]  Binding – It specifies the protocol to access the service and also an encoding method used to format the message contents. E.g. basicHttpBinding, wsHttpBinding . . etc.  Contract - Collection of operation that specifies what the endpoint will communicate with outside world.
  • 5. END POINT USING CONFIG FILE: • WCF Endpoint can be created using configuration file.
  • 6. END POINT USING CODE: • WCF Endpoint can be created using code.
  • 7. BINDING • Binding will describe how client will communicate with service. • There are 9 standard bindings in WCF Name Transport Encoding Interoperable BasicHttpBinding HTTP/HTTPS Text, MTOM Yes NetTcpBinding TCP Binary No NetPeerTcpBinding P2P Binary No NetNamedPipeBinding IPC Binary No WSHttpBinding HTTP/HTTPS Text, MTOM Yes WSFederationHttpBinding HTTP/HTTPS Text, MTOM Yes WSDualHttpBinding HTTP Text, MTOM Yes NetMsmqBinding MSMQ Binary No MsmqIntegrationBinding MSMQ Binary Yes
  • 8. CHOOSING A BINDING: • Have to know about client(WCF or NON-WCF) and service(WCF or NON-WCF) to choose binding.
  • 9. BINDING CONFIGURATION USING CONFIG FILE: • We have to add bindingConfiguration tag to the end point section. • We have to name a customized section in the binding section of the config file.
  • 11. CONTRACTS • Defines the Structure and Behavior of WCF Service. • The 3 core contracts are: 1. Service Contract - Describe the operation that service can provide. 2. Data Contract - Describes the custom data type which is exposed to the client. 3. Message Contract – Describes the message format for communication during runtime.
  • 12. SERVICE CONTRACT • Services are group of operations, both classes and interfaces are used for grouping operations. • Operations are defined by creating a method and marking it with OperationContractAttribute attribute. • Service contract is defined by marking a class or interface that group operations(methods) with ServiceContractAttribute attribute. DATA CONTRACT • It defines the data types that are passed to and from the WCF service. • It defines how data is serialized and deserialized. • By using Data Contracts we can make client to aware of custom created data types.
  • 13. MESSAGE CONTRACT • Message is the packet data which contains information. • Message Contract is used to customize the message as per the requirement. • WCF uses SOAP(Simple Object Access Protocol) Message format for communication. • Message contract can be applied to type using MessageContract attribute. • Custom Header and Body can be included to message using 'MessageHeader' and 'MessageBodyMember‘ attribute. FAULT CONTRACT • WCF provides the option to handle and convey the error message to client from service using SOAP Fault contract. • Fault Contract provides documented view for error accorded in the service to client. • service defines its fault contracts using the FaultContractAttribute.
  • 14. HOSTING A WCF SERVICE • WCF service cannot exist on its own, it has to be hosted using a host process. • There are mainly four different ways of hosting the WCF service. 1. IIS Hosting 2. Self Hosting 3. Windows Activation Service 4. Windows Service
  • 15. IIS HOSTING SELF HOSTING WAS WINDOWS SERVICE IIS automatically launches WCF provides the user to Windows Activation WCF Service starts when the host process when it host the service in any service is a system the system starts. All gets the first client application. service available with versions of windows request. Windows vista and support WCF hosting. windows server 2008, It is also available with IIS 7.0 It uses the IIS features Developer is responsible Hosting WCF in Process life time of the such as process recycling, for providing and Activation service takes service can be controlled idle shutdown, process managing the life cycle of many advantages such by Service Control health monitoring and the host process. as process recycling, Manager for windows message based activation. isolation, idle time service management and common configuration system. It will only support HTTP It will support almost all It supports Http, TCP It will support almost all protocol. types of protocols. and named pipes. types of protocols.