What should you do?

A Windows Communication Foundation (WCF) service has the following contract:

The service and the clients that call the service use NetTcpBinding with transaction flow enabled. You need to configure the service so that when TxOp1 and TxOp2 are invoked under the same client session, they run under the same transaction context. What should you do?
A. Update the service contract to read as follows.
[ServiceContract(SessionMode=SessionMode.Required)]
Add the following behavior to the service implementation
[ServiceBehavior(InstanceContextMode=InstanceContextMode.PerSession)]
B. Update the service contract to read as follows.
[ServiceContract(SessionMode=SessionMode.Allowed)]
Add the following behavior to the service implementation.
[ServiceBehavior(InstanceContextMode=InstanceContextMode.Single,
ReleaseServiceInstanceOnTransactionComplete=false)]
C. Update the service contract to read as follows
[ServiceContract(SessionMode=SessionMode.Allowed)]
Add the followng behavior to the service implementation.
[ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)]
D. Update the service contract to read as follows.
[ServiceContract(SessionMode=SessionMode.Required)]
Add the following behavior to the service implementation.
[ServiceBehavior(InstanceContextMode=InstanceContextMode.PerCall)]

microsoft-exams

Leave a Reply

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


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