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)]

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)]

相关考题:

There are two kinds of cross-cultural communication: () communication and bilateral communication. A、verbalB、successfulC、unilateralD、unsuccessful

You are developing a Windows Service. The Windows Service will host a Windows Communication Foundation (WCF) service.The Windows Service class will inherit from ServiceBase.You need to ensure that the WCF service starts when the Windows Service is restarted.What should you do in the Windows Service class?()A.B.C.D.

You are developing an application that performs file backups in the background. The background application will host a Windows Communication Foundation (WCF) service and must be active as soon as the machine is running. The background application will not have a user interface. A front-end application will consume the WCF service and will provide the user interface.You need to choose a host environment for the WCF service.Which hosting environment should you choose? ()A. Microsoft Internet Information Services (IIS) 6.0B. Windows Process Activation Services (WAS)C. A Windows Forms applicationD. A Windows Service

You are developing a Windows Communication Foundation (WCF) service. The service configuration file has a element defined. You need to ensure that all security audit information, trace logging, and message logging failures are recorded.Which configuration segment should you add to the element?()A.B.C.D.

A Windows Communication Foundation (WCF) service is required to log all authorization attempts to the Windows Event Log. You need to configure a behavior and apply it to the service to support this requirement. Which behavior should you configure and apply?()A. service Authentication ManagerB. service AuthorizationC. service CredentialsD. service Security Audit

You are using Windows Communication Foundation (WCF) to create a service. You need to implement a custom message-level security binding element. Which binding element should you use?() A. Transport Security Binding ElementB. Https Transport Binding ElementC. Ssl Stream Secunty Binding ElementD. Windows Stream Security Binding Element

A Windows Communication Foundation (WCF) service sends notifications when the service is started and stopped.You need to implement a client that logs these notifications. Which class should you use?() A. AnnouncementServiceB. AnnouncementClientC. DiscoveryClientD. HttpListener

You are creating a Windows Communication Foundation (WCF) service. You need to ensure that the service is compatible with ASP.NET to make use of the session state. Which binding should you use?() A. NetTcpContextBindingB. BasicHttpContextBindingC. NetTcpBindingD. NetMsmqBinding

Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the lTimeService service interface in the TimeService class.You need to configure the service endpoint for HTTP communication. How should you define the service and endpoint tags?()A.B.C.D.

You have an existing Windows Communication Foundation (WCF) service. You need to ensure that other services are notified when the service is started.What should you do?() A.B.C.D.

A Windows Communication Foundation (WCF) service implements the following contract. [ServiceContract] public interface IHelloService { [OperationContract(WebGet(UriTemplate="hello?name={name}"))] A.B.C.D.

What is the primary use of a remote access VPN?()A、to secure communication between two remote PCsB、to secure communication between two remote officesC、to secure communication betweenan remote PC and the corporate intranetD、to secure communication between a corporate intranet and the public internet

An automotive supplier maintains CAD workstations in widely separated plant locations, and these locations are interconnected by single 1.5Mb/second communication lines.  A consultant has been asked to provide a solution that will allow back-ups to be centralized in one location and improve data recovery times.  Which TWO questions should the consultant ask first to determine the best solution?()A、In what format are the CAD documents?B、How much data needs to be backed up from each remote site?C、What are the current acceptable windows for back up and restore?D、Are the plants within line-of-sight to enable wireless communication?E、Can the communication lines cost-effectively be upgraded to a higher level of service?

You are designing a Windows Azure application.   The application will include services hosted in different geographic locations.  The service locations may change.   You must minimize the cost of communication between services.  You need to recommend an approach for calling the services.  What should you recommend?()A、 Use the Service Management API.B、 Use Windows Azure Table storage.C、 Use Windows Azure Queue storage.D、 Use the Windows Azure AppFabric Service Bus.

You have a server that runs Windows Server 2008. You need to prevent the server from establishing communication sessions to other computers by using TCP port 25. What should you do()A、 From Windows Firewall, add an exceptionB、 From windows Firewall enable the block all incoming connections optionC、 From the Windows Firewall with Advanced Security snap-in, create an inbound ruleD、 From the Windows Firewall with Advanced Security snap-in, create an outbound rule.

You have a server that runs windows server 2008. You need to prevent the server from establishing communication sessions to other computers by using TCP port 25. What should you do?()A、From windows firewall, add an exception.B、From windows firewall enable the block all incoming connections option.C、From the windows firewall with advanced security snap-in, create an inbound rule.D、From the windows firewall with advanced security snap-in, create an outbound rule.

You are building a client for a Windows Communication Foundation (WCF) service. You need to create a proxy to consume this service. Which class should you use?()A、ChannelFactoryB、 ServiceHostC、ClientRuntimeD、CommunicationObject

A Windows Communication Foundation (WCF) service sends notifications when the service is started and stopped.You need to implement a client that logs these notifications. Which class should you use?()A、AnnouncementServiceB、AnnouncementClientC、DiscoveryClientD、HttpListener

A Windows Communication Foundation (WCF) service is required to log all authorization attempts to the Windows Event Log. You need to configure a behavior and apply it to the service to support this requirement. Which behavior should you configure and apply?()A、service Authentication ManagerB、service AuthorizationC、service CredentialsD、service Security Audit

You deploy a mobile messaging solution by using front-end and back-end servers that run Microsoft Exchange Server 2003 Service Pack 2.   Company policy requires that all Microsoft Windows Mobilebased devices must support Microsoft Exchange ActiveSync communication that is Federal Information Processing Standard compliant.   You need to deploy the Windows Mobilebased devices.   What should you use?()A、Microsoft Windows Mobile 5.0B、Microsoft Windows Mobile 2003 for Pocket PCC、Microsoft Windows Mobile 2003 Second EditionD、Microsoft Windows Mobile 5.0 with Microsoft Messaging and Security Feature Pack

You are creating a Windows Communication Foundation (WCF) service. You have the following requirements: Messages must be sent over TCP The service must support transactions. Messages must be encoded using a binary encoding Messages must be secured using Windows stream-based security.You need to implement a custom binding for the service. In which order should the binding stack be configured?()A、tcp Transport, windows Stream Security, transaction Flow, binary Message EncodingB、transaction Flow, binary Message Encoding, windows Stream Security, tcp TransportC、windows Stream Security, tcp Transport, binary Message Encoding, transaction FlowD、binary Message Encoding, transaction Flow, tcp Transport, windows Stream Security

You are using Windows Communication Foundation (WCF) to create a service. You need to implement a custom message-level security binding element. Which binding element should you use?()A、Transport Security Binding ElementB、Https Transport Binding ElementC、Ssl Stream Secunty Binding ElementD、Windows Stream Security Binding Element

单选题You are building a client for a Windows Communication Foundation (WCF) service. You need to create a proxy to consume this service. Which class should you use?()AChannelFactoryB ServiceHostCClientRuntimeDCommunicationObject

单选题You are designing a Windows Azure application.   The application will include services hosted in different geographic locations.  The service locations may change.   You must minimize the cost of communication between services.  You need to recommend an approach for calling the services.  What should you recommend?()A Use the Service Management API.B Use Windows Azure Table storage.C Use Windows Azure Queue storage.D Use the Windows Azure AppFabric Service Bus.

单选题Your company hosts web services in the company intranet.  The intranet is secured by a firewall.   Devices outside the firewall must be able to access the web services.  Company policies prohibit changes to firewall rules.  You need to recommend an approach for enabling inbound communication.  What should you recommend?()A Use Windows Server AppFabric.B Use the Windows Azure AppFabric Service Bus.C Use the Windows Azure AppFabric Access Control Service.D Use a Windows Communication Foundation (WCF) service in a Windows Azure role that relays to the internal web service

单选题You are creating a Windows Communication Foundation (WCF) service. You have the following requirements: Messages must be sent over TCP The service must support transactions. Messages must be encoded using a binary encoding Messages must be secured using Windows stream-based security.You need to implement a custom binding for the service. In which order should the binding stack be configured?()Atcp Transport, windows Stream Security, transaction Flow, binary Message EncodingBtransaction Flow, binary Message Encoding, windows Stream Security, tcp TransportCwindows Stream Security, tcp Transport, binary Message Encoding, transaction FlowDbinary Message Encoding, transaction Flow, tcp Transport, windows Stream Security

单选题You have a server that runs Windows Server 2008. You need to prevent the server from establishing communication sessions to other computers by using TCP port 25. What should you do()A From Windows Firewall, add an exceptionB From windows Firewall enable the block all incoming connections optionC From the Windows Firewall with Advanced Security snap-in, create an inbound ruleD From the Windows Firewall with Advanced Security snap-in, create an outbound rule.

单选题You are creating a Windows Communication Foundation (WCF) service. You need to ensure that the service is compatible with ASP.NET to make use of the session state. Which binding should you use?()ANetTcpContextBindingBBasicHttpContextBindingCNetTcpBindingDNetMsmqBinding