Exit 70-513 TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4
Question 2 of 5
0% complete
Q2 Single choice

A Windows Communication Foundation (WCF) client and service share the following service contract interface.

[ServiceContract]

public interface IContosoService {

[OperationContract]

void SavePerson(Person person);
}

They also use the following binding.

NetTcpBinding binding new NetTcpBinding { TransactionFlow = true };

The client calls the service with the following code

using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required))

{ IContosoService client = factoryCreateChannelO;

client SavePerson(person);

ConsoleWriteLine(

TransactionCurrentTransactionlnformation.

Distributedldentifier);

tsCompleteO;

}

The service has the following implementation for SavePerson

public void IContosoService SavePerson(Person person)

{ person.Saveo;

ConsoleWriteLine(TransactionCurrentTransactionlnformation.

Distributedidentifier);

}

The distributed identifiers do not match on the client and the server

You need to ensure that the client and server enlist in the same distributed transaction

What should you do?

  • A

    Add the following attributes to the SavePerson operation on IContosoService.
    [OperationBehavior(TransactionScopeRequired = true)] [TransactionFlow(TransactionFlowOption.
    Mandatory)]

  • B

    Add the following attributes to the SavePerson operation on lContosoService [TransactionFlow(TransactionFlowOption Mandatory)] [OperationBehavior (TransactionScopeRequired true)]

  • C

    Add the following attribute to the SavePerson operation on lContosoSernce [OperationBehavior(TransactionScopeRequired true)] Md the following attribute to the implementation of SavePerson. ITransactionFlow(TransactionFlowOptionAllowed)]

  • D

    Add the following attribute to the SavePerson operation on lContosoService [TransactionFlow(TransactionFlowOption Allowed)] Add the following attribute to the implementation of SavePerson. [OperationBehavior(TransactionScopeRequired true)]