Navigate to main content

Windows Communication Foundation Services

The new Windows Communication Foundation allow a seamless platform for communication between applications across the web with a common protocol for data transfer that is powerful and secure.

WCF is designed in accordance with service oriented architecture principles to support distributed computing where services are consumed by consumers. Clients can consume multiple services and services can be consumed by multiple clients. Services are loosely coupled to each other. Services typically have a WSDL interface which any WCF client can use to consume the service, irrespective of which platform the service is hosted on. WCF implements many advanced web services (WS) standards such as WS-Addressing, WS-ReliableMessaging and WS-Security.


A WCF service is composed of three parts, a Service class that implements the service to be provided, a host environment to host the service, and one or more endpoints to which clients will connect. All communication with the WCF service happens via the endpoints. The endpoints specify a Contract that defines which methods of the Service class will be accessible via the endpoint; each endpoint may expose a different set of methods. The endpoints also define a binding that specifies how a client will communicate with the service and the address where the endpoint is hosted.
In Windows Vista, Windows Server 2008/2012 and Windows 7 (operating systems that include IIS 7), Windows Activation Services can be used to host the WCF service. Otherwise the WCF service can be hosted in IIS, or it can be self-hosted in any process by using the ServiceHost class, which is provided by WCF. A self-hosted WCF service might be provided by a console-based application, a Windows Forms application, or a Windows service (the Windows counterpart to a daemon), for example.


A WCF client connects to a WCF service via an endpoint. Each service exposes its contract via one or more endpoints. An endpoint has an address, which is a URL specifying where the endpoint can be accessed, and binding properties that specify how the data will be transferred.
The mnemonic "ABC" can be used to remember Address / Binding / Contract. Binding specifies what communication protocols are used to access the service, whether security mechanisms are to be used, and the like. WCF includes predefined bindings for most common communication protocols such as SOAP over HTTP, SOAP over TCP, and SOAP over Message Queues, etc. Interaction between WCF endpoint and client is done using SOAP envelope. SOAP envelope are in simple XML form that make WCF platform independent.
When a client wants to access the service via an endpoint, it not only needs to know the contract, but it also has to adhere to the binding specified by the endpoint. Thus, both client and server must have compatible endpoints.