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
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
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.
The answer D: PerSession is correct! my bad
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.