.NET Framework 3.5 Documentation

Windows Communication Foundation (WCF)

WCF Terms and Concepts

Explore the fundamental building blocks and terminology of Windows Communication Foundation (WCF) in .NET Framework 3.5.

Service (Services)

A service is a unit of functionality exposed to other applications. In WCF, a service is typically represented by a class that implements one or more service contracts. It defines the operations that can be invoked by clients.

Endpoint

An endpoint is the intersection of an address, a binding, and a contract. It's how a client communicates with a service. Every WCF service exposes one or more endpoints.

Example of an endpoint configuration:


<endpoint address="http://localhost:8080/MyService"
          binding="basicHttpBinding"
          contract="IMyService" />
            

Binding

A binding specifies how clients and services communicate. It dictates the transport protocol, message encoding, and security settings. WCF provides several built-in bindings, and you can also create custom ones.

Contract (Operation Contract, Message Contract, Data Contract)

Contracts define the "shape" of a WCF service. They specify the operations, the format of messages, and the structure of data exchanged.

Example of a Data Contract:


[DataContract]
public class Customer
{
    [DataMember]
    public int Id { get; set; }

    [DataMember]
    public string Name { get; set; }
}
            

Message

The unit of data exchanged between a client and a service. In WCF, messages are typically SOAP messages, but can also be plain XML or binary.

Host

The process or environment where a WCF service is running. Services can be self-hosted, hosted in IIS, or hosted in Windows Services.

Channel & Channel Stack

WCF uses a channel architecture to handle communication. A channel is an object that processes messages. A channel stack is a series of channels that process messages for a specific endpoint.

Hosting (Self-Hosting, IIS Hosting, Windows Service Hosting)

The mechanism by which a WCF service is made available for clients to connect to. Each hosting model has its own setup and management requirements.

Interoperability

WCF's ability to communicate with services and clients built on different platforms and technologies, often achieved through standards like SOAP and WS-*.