Windows Communication Foundation


Overview

This course provides students with the knowledge and skills to build and configure a Windows Communication Foundation (WCF) Application.  This course is compatible with Microsoft Course Number 6164A

Audience

This course is for C# programmers that wish to publish or consume services using a variety of mechanisms.

Course Length: 3 days

Goals

At course completion, students will be able to:

  • Build a simple WCF service and WCF client
  • Create and configure a managed service application and set up a hosting environment
  • Expose a WCF service over different endpoints
  • Debug distributed applications
  • Define contracts meeting the application needs
  • Handle errors in WCF applications
  • Address quality of service issues
  • Implement security in WCF applications
  • Properly implement Transactions

Outline

INTRODUCTION TO WCF

  • What is WCF?
  • WCF Services
  • Service Orientation
  • WCF and Web Services
  • WCF = ABC
  • Address, Binding, Contract
  • Hosting Services
  • Internet Information Services
  • Internet Services Manager
  • Virtual Directory
  • Anonymous Access
  • Configuring .svc Extension
  • A Service Contract
  • A Website for the Service
  • WCF Service Template
  • Service Configuration
  • Configuration Details
  • Referencing the Class Library
  • Examining the Service in the Browser
  • Metadata Publishing Support
  • Service in the Browser with Metadata
  • WCF Clients
  • Creating WCF Clients
  • WCF Architecture
  • ServiceHost and ChannelFactory
  • Service Contexts and Instances

DATA CONTRACTS

  • Data Contracts
  • XSD for Data Contract
  • Arrays
  • Array in XML Schema
  • Array in Proxy
  • Generic Collections
  • Generic Collection in XML Schema
  • Generic Collection in Proxy
  • Enumerations in Data Contracts
  • Employee Client Program
  • Saving and Restoring
  • Serialization in WCF
  • Serialization in .NET
  • SOAP Serialization
  • JSON Serialization
  • DataContract Serialization
  • Using XmlSerializer
  • Restoring Data
  • Versioning
  • New and Missing Members
  • Versioning Demonstration
  • New Client of Old Service
  • Round Trip
  • Required Members
  • OnDeserializing Event

ADDRESSES AND BINDINGS

  • Addresses
  • Transports
  • Bindings
  • Message Exchange Patterns (MEPs)
  • Security
  • Choosing a Binding
  • HTTP Bindings
  • TCP and Named Pipe Bindings
  • MSMQ Bindings
  • Working with Endpoints
  • Importance of BasicHttpBinding
  • WCF Service Hosting
  • ServiceHost
  • Client Program without Proxy Class
  • Using a Channel Factory
  • Service Endpoints
  • Multiple Endpoints
  • Configuration Files
  • Simplified Host Code
  • Configuring Metadata Exchange

SERVICE CONTRACTS

  • Service Contracts at Class Level
  • Service Contracts at Interface Level
  • Benefits of Interface Level Definition
  • A Service with Multiple Contracts
  • ServiceContractAttribute
  • Viewing WSDL Files
  • Contract Inheritance
  • Operation Overloading
  • Enabling Operation Overloading
  • Operation Overloading Client

INSTANCE MANAGEMENT

  • Behaviors
  • WCF Behaviors
  • Configuring Behaviors
  • Configuring Behaviors in Code
  • WCF Instancing Models
  • Per-Call Instancing
  • Per-Session Instancing
  • Sessions and Threading
  • Singleton Instancing
  • Which Model to Use?

MORE ABOUT SERVICE CONTRACTS

  • Versioning Service Contracts
  • Version 1 Service
  • Version 2 Service
  • New Operations
  • Version 3 Service
  • Version 1 Client / Version 3 Service
  • Message Exchange Patterns
  • Request-Reply
  • Oneway
  • Duplex
  • Callbacks
  • Invoking a Callback
  • Callback on the Client
  • Asynchronous Proxies
  • Threading Considerations

HANDLING ERRORS

  • Errors in Distributed Systems
  • Errors in .NET and WCF
  • Service Library Code
  • Client Code
  • Client Exception Handling
  • Fault Exceptions
  • Faults
  • Exception Details in Faults
  • Exceptions Dialog
  • Fault Contracts
  • Custom Faults
  • Faulted Channels

 


Service Oriented Architecture is the latest trend in scalable application development.  WCF provides an easy way for developers to create services that can be accessed in several different ways.

WCF supports platform neutral web services, but also, transparently, supports .Net remoting for more efficient .Net to .Net communications as well as several other protocols and transports.

 

Contact us today for a price quote and to schedule your onsite WCF training course.