网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
You are developing a Windows Communication Foundation (WCF) service to replace an existing ASMX Web service.The WCF service contains the following code segment. (Line numbers are included for reference only.) 01 [ServiceContract( )] 02 03 public interface IEmployeeService 04 { 05 [OperationContract( )] 06 EmployeeInfo GetEmployeeInfo(int employeeID); 07 08 } 09 10 public class EmployeeService : IEmployeeService 11 { 12 13 public EmployeeInfo GetEmployeeInfo(int employeeID) 14 { 15 ... 16 } 17 } 18 19 20 public class EmployeeInfo 21 { 22 ... 23 public int EmployeeID { get; set; } 24 public string FirstName { get; set; } 25 public string LastName { get; set; } 26 27 }The existing Web service returns the EmployeelD as an attribute of the Employeelnfo element in the response XML.You need to ensure that applications can consume the service without code changes in the client. What should you do?()
A

Insert the following code at line 02. [DataContractFormat()] Insert the following code at line 22. [DataMember()]

B

Insert the following code at line 02. [XmlSerializerFormat()] Insert the following code at line 22. [XmlAtttibute()]

C

Insert the following code at line 09. [XmlSerializerFormat()] Insert the following code at line 22. [XmlAttribute()]

D

Insert the following code at line 19. [DataContractFormat()] Insert the following code at line 22. [DataMember()]


参考答案

参考解析
解析: 暂无解析
更多 “单选题You are developing a Windows Communication Foundation (WCF) service to replace an existing ASMX Web service.The WCF service contains the following code segment. (Line numbers are included for reference only.) 01 [ServiceContract( )] 02 03 public interface IEmployeeService 04 { 05 [OperationContract( )] 06 EmployeeInfo GetEmployeeInfo(int employeeID); 07 08 } 09 10 public class EmployeeService : IEmployeeService 11 { 12 13 public EmployeeInfo GetEmployeeInfo(int employeeID) 14 { 15 ... 16 } 17 } 18 19 20 public class EmployeeInfo 21 { 22 ... 23 public int EmployeeID { get; set; } 24 public string FirstName { get; set; } 25 public string LastName { get; set; } 26 27 }The existing Web service returns the EmployeelD as an attribute of the Employeelnfo element in the response XML.You need to ensure that applications can consume the service without code changes in the client. What should you do?()A Insert the following code at line 02. [DataContractFormat()] Insert the following code at line 22. [DataMember()]B Insert the following code at line 02. [XmlSerializerFormat()] Insert the following code at line 22. [XmlAtttibute()]C Insert the following code at line 09. [XmlSerializerFormat()] Insert the following code at line 22. [XmlAttribute()]D Insert the following code at line 19. [DataContractFormat()] Insert the following code at line 22. [DataMember()]” 相关考题
考题 You are developing a Windows Communication Foundation (WCF) service. You enable logging in the configuration file.The opening tag is defined as follows.messagelogging br= logentiremessage=true logMalformedMessages=truelogMessagesAtServiceLevel=truelogMessagesAtTransportLevel=truemaxMessagesToLog=20You need to ensure that logging is implemented so that only messages with SOAP headers are logged.What should you add to the filters element of the application configuration file?()A.B.C.D.

考题 You are developing a Windows Communication Foundation (WCF) service.You need to enable security auditing for all events.What should you do?() A. Set the serviceAuthorizationAuditLevel setting to Success and the messageAuthenticationAuditLevel setting to Success.B. Set the messageAuthenticationAuditLevel setting to Success and the auditLogLocation setting to Application.C. Set the serviceAuthorizationAuditLevel setting to SuccessAndFailure and the messageAuthenticationAuditLevel setting to SuccessAndFailure.D. Set the messageAuthenticationAuditLevel setting to SuccessAndFailure and the auditLogLocation setting to Security.

考题 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. You establish that the largest size of valid messages is 8,000 bytes. You notice that many malformed messages are being transmitted.Detailed information about whether each message is malformed must be logged.You need to ensure that this information is saved in XML format so that it can be easily analyzed.What should you add to the service configuration file?()A.B.C.D.

考题 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.

考题 You are developing a Windows Communication Foundation (WCF) service.You must record all available information for the first 1,000 messages processed, even if they are malformed.You need to configure the message logging section of the configuration file.Which configuration segment should you use? ()A.B.C.D.

考题 You are developing a Windows Communication Foundation (WCF) service. The service operation takes a customer number as the only argument and returns information about the customer. The service requires a security token in the header of the message. You need to create a message contract for the service.Which code segment should you use?()A.B.C.D.

考题 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.

考题 Your Windows Communication Foundation (WCF) client application uses HTTP to communicate with the service.You need to enable message logging and include all security information such as tokens and nonces in logged messages.What should you do?()A.B.C.D.

考题 You are developing a Windows Communication Foundation (WCF) service. You need to enable security auditing for all events. What should you do?()A、Set the serviceAuthorizationAuditLevel setting to Success and the messageAuthenticationAuditLevel setting to Success.B、Set the messageAuthenticationAuditLevel setting to Success and the auditLogLocation setting to Application.C、Set the serviceAuthorizationAuditLevel setting to SuccessAndFailure and the messageAuthenticationAuditLevel setting to SuccessAndFailure.D、Set the messageAuthenticationAuditLevel setting to SuccessAndFailure and the auditLogLocation setting to Security.

考题 You are developing a Windows Communication Foundation (WCF) service that is hosted by a Windows Forms Application.The ServiceHost instance is created in the Form Constructor.You need to ensure that the service is not blocked while the UI thread is busy. What should you do?()A、Decorate the service implementation class with the following line of code [ServiceBehavior(UseSyncronizationContext = false)]B、Decorate the service implementation class with the following line of code [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]C、Call the Invoke method of the form and supply a delegate.D、Call the BeginInvoke method of the form and supply a delegate.

考题 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

考题 A Windows Communication Foundation (WCF) service has a callback contract. You are developing a client application that will call this service.You must ensure that the client application can interact with the WCF service. What should you do?()A、On the OperationContractAttribute, set the AsyncPattern property value to true.B、On the OperationContractAttribute, set the ReplyAction property value to the endpoint address of the client.C、On the client, create a proxy derived from DuplexClientBaseTChannel .D、On the client, use GetCallbackChannelT .

考题 单选题You are developing a data contract for a Windows Communication Foundation (WCF) service. The data in the data contract must participate in round trips. Strict schema validity is not required. You need to ensure that the contract is forward-compatible and allows new data members to be added to it. Which interface should you implement in the data contract class?()A ICommunicationObjectB IExtensionC IExtensibleObjectD IExtensibleDataObject

考题 单选题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 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 is deployed with netTcpBinding. This service uses a duplex message exchange pattern.You are developing the next version of the WCF service. You discover that your company's hardware load balancer performs correctly only for WCF services that use HTTP. You need to ensure that your service works with the load balancer. What should you do?()A Use basicHttpBinding.B Create a custom binding that has the compositeDuplex, textMessageEncoding, and namedPipeTransport binding elements in this order.C Create a custom binding that has the compositeDuplex, textMessageEncoding, and wsHttpTransport binding elements in this order.D Use wsHttpBinding.

考题 单选题You are developing a Windows Communication Foundation (WCF) service that reads messages from a public non-transactional MSMQ queue.You need to configure the service to read messages from the failed-delivery queue.Which URI should you specify in the endpoint configuration settings of the service?()A net.msmq://localhost/msmq$FailedMessagesB net.msmq://localhost/msmq$DeadLetterC net.msmq://localhost/system$DeadXactD net.msmq://localhost/system$DeadLetter

考题 单选题You are developing a Windows Communication Foundation (WCF) service. Client applications require reliable sessions to access the service.Users report that they receive ServerTooBusyException errors when their client application tries to establish a session. You need to ensure that the service can handle a minimum of 30 client connection requests. Which ReliableSessionBindingElement property should you configure?()A MaxRetryCountB MaxTransferWindowSizeC MaxPendingChannelsD InactivityTimeout

考题 单选题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

考题 单选题You are developing a client application that consumes a Windows Communication Foundation (WCF) service. The operation contract is as follows. [OperationContract] [FaultContract(typeof(SalesFault))] string GetSales(string saleId);() The service configuration file contains the following line in the serviceBehaviors section. A divide-by-zero exception is not being handled by the service. You need to ensure that the exception is caught in the client application. Which type of exception should the client catch?()A TimeoutExceptionB FaultExceptionC DivideByZeroExceptionD FaultExceptionSalesFault

考题 单选题A Windows Communication Foundation (WCF) service has a callback contract. You are developing a client application that will call this service.You must ensure that the client application can interact with the WCF service. What should you do?()A On the OperationContractAttribute, set the AsyncPattern property value to true.B On the OperationContractAttribute, set the ReplyAction property value to the endpoint address of the client.C On the client, create a proxy derived from DuplexClientBaseTChannel .D On the client, use GetCallbackChannelT .