Which of the following code segments should you use to implement this?

You are working on a WCF service that will have various client sessions connecting to it. You want
a service instance to be created each time a client uses the service. Which of the following code
segments should you use to implement this?

You are working on a WCF service that will have various client sessions connecting to it. You want
a service instance to be created each time a client uses the service. Which of the following code
segments should you use to implement this?

A.
[ServiceContract (InstanceContextMode = InstanceContextMode.PerCall)]

B.
[ServiceBehaviorAttribute(InstanceContextMode = InstanceContextMode.PerCall)]

C.
[ServiceContract(InstanceContextMode = InstanceContextMode.PerCall)]

D.
[ServiceBehaviorAttribute(InstanceContextMode = InstanceContextMode.PerSession)]

Explanation:



Leave a Reply 0

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