Tutorial: Get started with Windows Communication Foundation applications
The following series of tutorials introduce you to the Windows Communication Foundation (WCF) programming experience. Working through these tutorials in order will give you an introductory understanding of the steps required to create WCF applications. After you finish, you'll have a running WCF service and a WCF client that calls the service.
The tutorial assumes you're using Visual Studio as the development environment. If you're using another development environment, ignore the Visual Studio-specific instructions.
For more in-depth information about creating services and clients, see Basic WCF programming.
The first three tutorials describe how to define a WCF service contract, how to implement it, and how to host it. The service that you create is self-hosted within a console application. You can also host services under Microsoft Internet Information Services (IIS). For more information, see How to: Host a WCF Service in IIS. Although you use code to configure the service in the tutorial, you can also configure services within a configuration file.
You create a WCF contract with a user-defined interface. This contract defines the functionality that the service exposes.
After you define a contract, you must implement it with a service class.
Configure an endpoint for the service and host the service in a console application. For a service to become active, you must configure it and host it within a run-time environment. This run-time environment creates the service and controls its context and lifetime.
The next two tutorials describe how to create, configure, and use a client application to call the operations the service exposes. Services publish metadata that define the information a client application needs to communicate with the service. Visual Studio automates the process of accessing this metadata and uses it to construct the client application for the service. If you decide not to use Visual Studio, you can use the ServiceModel Metadata Utility tool (Svcutil.exe) instead.
Retrieve metadata for creating a WCF client proxy from a WCF service. You retrieve metadata by using Visual Studio to add a service reference or you can use the ServiceModel Metadata Utility tool. You specify the endpoint that the client uses to access the service.
Use the WCF client proxy to call the service operations.
- Conceptual overview
- Guide to the documentation
- What is Windows Communication Foundation
- WCF feature details
- Basic programming lifecycle
- Building clients
- Basic WCF programming
- How to: Create a duplex contract
- How to: Access services with a duplex contract
- ServiceModel Metadata Utility tool (Svcutil.exe)
- How to: Use Svcutil.exe to download metadata documents
- How to: Publish metadata for a service using a configuration file
- Using bindings to configure services and clients
- Getting started sample
- Windows Communication Foundation samples