欢迎来到PP题库网 PP题库官网
logo
全部科目 > 微软认证考试 > MCTS > MCTS(70-513)

单项选择题

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 = factory.CreateChannel();
client.SavePerson(person);
Console.WriteLine(Transaction.Current.TransactionInformation.DistributedIdentifier);
ts.Complete();
}

The service has the following implementation for SavePerson:

public void IContosoService.SavePerson(Person person)
{
person.Save();
Console.WriteLine(Transaction.Current.TransactionInformation.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.
    B.
    C.
    D.

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题