Export (0) Print
Expand All

Integrating with Windows Communication Foundation (WCF)

SharePoint 2010

Last modified: April 20, 2010

Applies to: SharePoint Foundation 2010

In this article
Components of a WCF Service
Communicating with a WCF Service
Creating a WCF Service

The Windows Communication Foundation (WCF) service model controls communication between client and service. The Service Application Framework model controls deployment, management, and discovery of services in a server farm. These models are complementary, and the SharePoint 2010 model is ideal for deploying, managing, and discovering WCF service clients and endpoints.

For more information about WCF, see Windows Communication Foundation.

A WCF service has three components:

  • A service class that implements the service to be provided

  • A host environment to host the service

  • One or more endpoints to which clients can connect

Each endpoint has four properties that determine the following:

  • An address for the endpoint

  • A binding that specifies how a client can communicate with the endpoint

  • A contract that identifies the available operations

  • A set of behaviors that specify local implementation details of the endpoint

For more information about using WCF endpoints with the Service Application Framework, see Using Service Endpoints.

To create a WCF service, you perform the following basic tasks, in order:

  1. Define the service contract. A service contract specifies the signature of a service, the data it exchanges, and other contractually required data.

  2. Implement the contract. Create the class that implements the contract and specify custom behaviors that the runtime should have.

  3. Configure the service by specifying endpoint information and other behavior information.

  4. Host the service in an application.

  5. Build a client application.

For a detailed example, see Creating a Custom WCF Service in SharePoint Foundation.

Show:
© 2014 Microsoft