I.WCF Advance Topics

  1. ASP.Net Compatibility: It should be enabled when hosing service under ASP.Net and need to use asp.net features like HttpContext

  2. Instancing Mode

    1. PerCall: A new InstanceContext (and therefore service object) is created for each client request.

    2. 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).

    3. Single: A single InstanceContext (and therefore service object) handles all client requests for the lifetime of the application.

  3. Concurrency

    1. Concurrency is the control of the number of threads active in an InstanceContext at any one time. The following three concurrency modes are available:

      1. Single: Each instance context is allowed to have a maximum of one thread processing messages in the instance context at a time. Other threads wishing to use the same instance context must block until the original thread exits the instance context.

      2. Multiple: Each service instance can have multiple threads processing messages concurrently. The service implementation must be thread-safe to use this concurrency mode.

      3. Reentrant: Each service instance processes one message at a time, but accepts re-entrant operation calls. The service only accepts these calls when it is calling out through a WCF client object.

  1. Durable Services

  2. Service Throttling

  3. Serialization

      1. Data Contract Serialization

      2. XML Serialization