You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You write the following code segment to define the service.
(Line numbers are included for reference only.)
01
02 public interface IMyService
03 {
04 [OperationContract]
05 void ProcessOrder(int ordered);
06 }
07 public class serviceImpl : MyService
08 {
09 [OperationBehavior(TransactionAutoComplete=false, TransactionScopeRequired=true)]
10 public void ProcessOrder(int custId)
11 {
12 //Implementation
13 }
14 }
You need to set the ServiceContract attribute for the transaction behavior of the service.
Which code segment should you insert at line 01?
A.
[ServiceContract(SessionMode=SessionMode.Required)]
B.
[ServiceContract(SessionMode=SessionMode.Allowed)]
C.
[ServiceContract(SessionMode=SessionMode.Allowed,
ProtectionLevel=ProtectionLevel.EncryptAndSign)]
D.
[ServiceContract(SessionMode=SessionMode.NotAllowed,
ProtectionLevel=ProtectionLevel.EncryptAndSign)]