A WCF service code is implemented as follows. (Line numbers are included for reference only.)
01 <ServiceContract()>
02 <ServiceBehavior(
03 InstanceContextMode:=InstanceContextMode.Single)>
04 Public Class CalculatorService
05
06 <OperationContract()>
07 Public Function Calculate(ByVal op1 As Double,
08 ByVal op As String, ByVal op2 As Double) As Double …
24 End Function
25
26 End Class
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.