PrepAway - Latest Free Exam Questions & Answers

You need to ensure that the service is invoked within a transaction

You are developing a Windows Communication Foundation (WCF) service that allows
customers to update financial dat a. The service contract is defined as follows. (Line
numbers are included for reference only.) You need to ensure that the service is invoked
within a transaction. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Replace line 01 with the following code. [ServiceContract( SessionMode =
SessionMode.NotAllowed)]

B.
Replace line 01 with the following code. [ServiceContract( SessionMode =
SessionMode.Required)]

C.
Insert the following code at line 08. [ServiceBehavior(
TransactionAutoCompleteOnSessionClose = false)]

D.
Insert the following code at line 08. [ServiceBehavior(
ReleaseServiceInstanceOnTransactionComplete = false)]

Explanation:


Leave a Reply