Instructor-led training
Complete Windows Communication Foundation (WCF) for .NET 4.0 Training in Bonham, Texas
Windows Communication Foundation (WCF) is an API used to build distributed applications using .NET 3.0 (and higher).
What you'll learn
Private Training for Teams
This course is offered as private, instructor-led training for organizations, onsite in Bonham, Texas or live online. Dates, delivery format, and course content are arranged around your team's requirements.
This course is not currently scheduled as a public class for individual enrollment.
Request Group TrainingPrerequisites
Course Outline
Introducing WCF
Understand the motivation behind Windows Communication Foundation (WCF)
Examine the WCF assemblies and core namespaces
Understand the ABCs (address, bindings, contracts) of a WCF service
Details of the intrinsic WCF binding types
Configuring bindings via code and via *.config files
A first look at WCF contracts and contractural attributes
Working with the WCF Test Client and WCF Configuration Editor
WCF Hosts and Clients
The role of System.ServiceModel.ServiceHost
Building Self-Hosting Services
Specifying the ABCs declaratively and in code
The role of the element
Configuring multiple endpoints
Configuring Metadata Exchange (MEX)
The role of the element
Generating client proxies
Hosting a WCF service within a Windows Service
Hosting a WCF service within IIS
Invoking WCF service methods asynchronously using delegates
Building Robust WCF Services
Details of the ServiceContract attribute
Details of the OperationContract attribute
Designing WCF data contracts
The role of the DataContractSerializer
Specifying order of data members
The role of the KnownType attribute
Complex parameters and return values
Versioning WCF contracts
Controlling the format of SOAP messages
Mapping CLR exceptions to SOAP faults
Building strongly typed SOAP faults
Stateful WCF Services
Understanding Server Instance Context Modes
The ServiceBehavior attribute
Configuring per session, per call and singleton server instances
The role of the OperationBehavior attribute
Sequencing method operations
WCF Changes under .NET 4.0
Overview of minor .NET 4.0 changes
Working with default endpoints
Building RESTful WCF services
Building RESTful WCF clients
WCF Security
Survey the role of WCF security
Examine security techniques for TCP-based WCF services
Examine security techniques for HTTP-based WCF services
Appendix
A review of Windows Distributed APIs
COM+ Integration
Configuring Message and Transport Security
Where WCF gets difficult
WCF has little new C# syntax to learn. The difficulty is that one service is described in several places that must agree: the contract in code, the binding and address in code or configuration, and the host that opens the endpoint. The syllabus starts with the ABCs (address, bindings, contracts) and the intrinsic binding types. It has you configure bindings both in code and in *.config files, and it introduces the WCF Test Client and WCF Configuration Editor. Most later problems trace back to a mismatch among these three parts.
The topics then build in layers:
- Hosting and clients. ServiceHost, self-hosting, multiple endpoints, Metadata Exchange (MEX) and generated client proxies. Hosting in a Windows Service and in IIS comes next, followed by asynchronous calls through delegates.
- Contracts. ServiceContract and OperationContract, data contracts and the DataContractSerializer, member order, KnownType, contract versioning and control over SOAP message format. Versioning is the hard part, because a change that compiles can still break clients already deployed.
- Faults. The course maps CLR exceptions to SOAP faults and builds strongly typed faults. A common misconception is that an exception simply travels back to the caller. An exception that is not a declared fault can leave the client channel unusable, so fault design is part of the contract.
- State. Per-call, per-session and singleton instance modes, set through ServiceBehavior and OperationBehavior, plus operation sequencing. Per-session state is often confused with web session state, but it is tied to the channel.
- .NET 4.0 changes and security. Default endpoints, RESTful services and clients, then security for TCP-based and HTTP-based services. The appendix covers message versus transport security and COM+ integration.
Who it suits and what to take around it
The course is labeled introductory because it assumes no WCF knowledge. It is aimed at developers with working .NET 2.0-era experience in C# or VB.NET and an understanding of object-oriented programming. It targets .NET Framework 4.0, which is out of support according to the vendor's lifecycle listing. It therefore fits organizations that build, maintain, support or migrate existing WCF systems on that framework family.
If the framework fundamentals are still new, .NET Framework Essentials Using C# covers the base this course builds on. Because the syllabus includes RESTful WCF services and clients, ASP.NET Web API Essentials Using C# is a useful follow-up for comparing the two HTTP service styles. For deeper work on threading and the runtime, which matters once you move beyond the delegate-based asynchronous calls covered here, see Advanced .NET Framework Programming Using C#.
Teams on other framework versions can ask about a customized private session through a training proposal request.
Illustrative scenarios
The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.
- Exposing one service two ways. A team might expose the same contract over a TCP binding for internal callers and an HTTP binding for others. That uses multiple endpoints, MEX for proxy generation and a choice of host, such as a Windows Service or IIS.
- Changing a data contract safely. A team adding a field to a message that existing clients consume must decide on member order, KnownType for derived types and a versioning approach. It must also decide which failures become typed SOAP faults instead of raw exceptions.
- Fixing state bugs under load. A service that keeps data in fields may behave differently under per-call, per-session and singleton instance modes. A team might use the ServiceBehavior and OperationBehavior settings to make the lifetime explicit and to sequence operations that depend on each other.
AI coding assistants and WCF
AI coding assistants are useful for boilerplate here: attributed contract interfaces, data contract classes, and first drafts of endpoint and binding configuration. They can also explain an unfamiliar config section. They are weaker where the behavior depends on how the pieces interact.
- Version mismatch. Suggestions often assume newer .NET idioms or APIs that do not exist in .NET Framework 4.0. Check every generated type and member against the targeted framework.
- Configuration that looks right. Generated address, binding and contract settings can be syntactically valid yet mismatched between host and client. Test with the WCF Test Client and inspect the metadata that MEX publishes.
- Instance mode and faults. Assistants tend to ignore instance context mode, thread safety of singleton services and declared faults. Review these by hand and write tests that call the service repeatedly and trigger error paths.
- Security. Never accept generated transport or message security settings without checking them against the TCP or HTTP scenario you actually deploy.
Run a real client against a hosted endpoint rather than judging the code by reading it.
Frequently asked questions
What level is this course, and who is it for?
It is introductory to WCF and assumes no prior WCF knowledge. Attendees should be experienced .NET developers comfortable with object-oriented programming in C# or VB.NET.
Which framework version does it use?
.NET Framework 4.0, including the WCF changes introduced with it, such as default endpoints and RESTful services. That version is out of support per the vendor's lifecycle listing, so the course suits teams maintaining or migrating existing systems.
What does the syllabus cover?
The ABCs, bindings, contracts, self-hosting, Windows Service and IIS hosting, MEX and client proxies. It also covers data contracts, versioning, SOAP faults, instance context modes, RESTful services and clients, and TCP and HTTP security.
Can the course be delivered privately for our team?
Yes. HSG delivers private training onsite at your location or live online, and the content can be customized.
Can it be tailored to the framework version we use?
Private training can be tailored to the technology versions an organization uses, including current releases. Send details through the training proposal request.
Training locations
Complete Windows Communication Foundation (WCF) for .NET 4.0 training across the U.S. and beyond.
We provide private Complete Windows Communication Foundation (WCF) for .NET 4.0 training for organizations, onsite at your location or live online, throughout the United States and internationally.
View all Complete Windows Communication Foundation (WCF) for .NET 4.0 training locations
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- For a single employee or an entire team
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.