Steps to Create a WCF Service
Server side needs of WCF
1. Service contract: defines operations exposed at the service boundary and data passed that is passed through these operations.
2. Service data contracts: needed for defining complex types passed through service contract operations.
3. Service implementation: provides functional code to process incoming service information to determine what to do with it.
4. Service configuration: specifies how service is exposed in terms of address, binding, and contract (ABCs of WCF) which includes network protocol, message encoding, security methodologies, reliability, transactions, etc.
5. Service host: determines the process on which the service runs such as self-hosting, IIS or Windows Activation Service (WAS).
6. Service behavior: enables the service for metadata exchange (thereby allowing users to browse its wsdl), the programmer will need to set the metadata exchange properties for the service. Behavior is a collection of attributes that can be set and applied to the service.
7. Service instancing: determines the mode of operation for the service object (Per-call, per-session, or singleton).
PerCall: A new InstanceContext (and therefore service object) is created for each client request.
PerSession: A new InstanceContext (and therefore service object) is created for each new client session and maintained for the lifetime of that session (this requires a binding that supports sessions).
Single: A single InstanceContext (and therefore service object) handles all client requests for the lifetime of the application.