Which instance mode should you use?

You are developing a WCF service.
A new service instance must be created for each client session.
You need to choose an instancing mode.
Which instance mode should you use?
A. PerCall
B. Single
C. Multiple
D. PerSession
E. PerRequest

microsoft-exams

3 thoughts on “Which instance mode should you use?

  1. The correct answer is A: PerCall.
    There is no thing such as PerRequest.

    Refer https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/sessions-instancing-and-concurrency

    The following instancing modes are available:

    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.

  2. The correct answer is A: PerCall.
    There is no thing such as PerRequest.

    Refer https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/sessions-instancing-and-concurrency

    The following instancing modes are available:

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.