可学答题网 > 问答 > MCTS(70-513)题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

A Windows Communication Foundation (W


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
参考答案
参考解析:
分类:MCTS(70-513)题库
相关推荐

1、A Windows Communication Foundation (W

A Windows Communication Foundation (WCF) service is deployed with netTcpBinding.This service uses a duplex message exchange pattern.You are develop...

2、A Windows Communication Foundation (WC

A Windows Communication Foundation (WCF) service sends notifications when the service is started and stopped.You need to implement a client that...

3、A Windows Communication Foundation (W

A Windows Communication Foundation (WCF) solution exposes the following service over a TCP binding.(Line numbers are included for reference only.)...

4、A Windows Communication Foundation (W

A Windows Communication Foundation (WCF) service is hosted in Microsoft Internet Information Services (IIS). You are preparing the configuration f...

5、A Windows Communication Foundation (W

A Windows Communication Foundation (WCF) service has the following contract:[ServiceContract]public class ContosoService{ [OperationContract] [Transacti...

6、A Windows Communication Foundation (W

A Windows Communication Foundation (WCF) client uses the following service contract.(Line numbers are included for reference only.)01 [ServiceContra...