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

A Windows Communication Foundation (W


A Windows Communication Foundation (WCF) solution uses the following contract: [ServiceContract(SessionMode=SessionMode.Allowed)]public interface IMyService{ [OperationContract(IsTerminating=false)] void Initialize(); [OperationContract(IsInitiating=false)] void DoSomething(); [OperationContract(IsTerminating=true)] void Terminate();} You need to change this interface so that: lnitialize is allowed to be called at any time before Terminate is called. DoSomething is allowed to be called only after Initialize is called, and not allowed to be called after Terminate is called. Terminate will be allowed to be called only after Initalize is called.Which two actions should you perform? (Each correct answer presents part of the sdution. Choose two)()。

  • A Change the ServiceContract attribute of the IMyService interface to the following. [ServiceContract(SessionMode=SessionMode.Required)]
  • B Change the ServiceContract attrbute of the IMyService interface to the following [ServiceContract(SessionMode=SessionMode.Allowed)]
  • C Change the OperationContract attribute of the Initialize operation to the following. [OperationContract(IsInitiating = true, IsTerminating = false)]
  • D Change the OperationContract attribute of the Terminate operation to the following [OperationContract(IsInitiating = false, IsTerminating = true)]
参考答案
参考解析:
分类: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) client and service share the following service contract interface:[ServiceContract]public interface IContosoS...

5、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...

6、A Windows Communication Foundation (W

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