WCF architecture
The following diagram illustrates the principal layers of the Windows Communication Foundation (WCF) architecture. This diagram is taken from the Microsoft website (http://msdn.microsoft.com/en-us/library/ms733128.aspx):
The Contracts layer defines various aspects of the message system. For example, the Data Contract describes every parameter that makes up every message that a service can create or consume.
The Service runtime layer contains the behaviors that occur only during the actual operation of the service, that is, the runtime behaviors of the service.
The Messaging layer is composed of channels. A channel is a component that processes a message in some way, for example, in authenticating a message.
In its final form, a service is a program. Like other programs, a service must be run in an executable format. This is known as the hosting application.
In the next section, we will explain these concepts in detail.