What are two possible ways to achieve this goal?

A WCF service code is implemented as follows. (Line numbers are included for reference
only.) 01 [ServiceContract] 02 [ServiceBehavior(InstanceContextMode = 03
InstanceConcextMode.Single)] 04 public class CalculatorService 05 { 06
[OperacionContract] 07 public double Calculate(double opl, string op, double op2) 08 { …
24 } 25 } You need to decrease the response time of the service. What are two possible
ways to achieve this goal? (Each correct answer presents a complete solution. Choose
two.)

A WCF service code is implemented as follows. (Line numbers are included for reference
only.) 01 [ServiceContract] 02 [ServiceBehavior(InstanceContextMode = 03
InstanceConcextMode.Single)] 04 public class CalculatorService 05 { 06
[OperacionContract] 07 public double Calculate(double opl, string op, double op2) 08 { …
24 } 25 } You need to decrease the response time of the service. What are two possible
ways to achieve this goal? (Each correct answer presents a complete solution. Choose
two.)

A.
Change the service behavior to the following. [ServiceBehavior( InstanceContextMode =
InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple) ]

B.
Change the service behavior to the following. [ServiceBehavior(InstanceContextMode =
InstanceContextMode.PerCall) ]

C.
Require the clients use threads, the Parallel Task Library, or other mechanism to issue
service calls in parallel.

D.
Require the clients to use async operations when calling the service.



Leave a Reply 0

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