What Are The Four Layers in WCF Architecture? | WCF Interview Question

, ,
SOA based WCF architecture has four layers. 

1. Contracts 
It describe the WCF message system. This is achieved by three contracts with policies and bindings. 
  • Service Contract - Describes the method signature of the service using C# or VB 
  • Data Contract - Enables .NET types to be in XML 
  • Message Contract - Defines the structure os the SOAP message exchanged between the service and client 
  • Policies and Bindings - Defines the security level required by the clients 
2. Service Runtime 
This includes the behaviors that occur when service is running. 

3. Messaging 
This layer contains the channels that process messages and operate on messages and message headers 

4. Hosting 
Describes the ways in which WCF service can be hosted.