CMS专题

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

题目
单选题
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()]

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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.


参考答案:B

第2题:

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.


参考答案:D

第3题:

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="true"logMessagesAtServiceLevel="true"logMessagesAtTransportLevel="true"maxMessagesToLog="20">You 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.


参考答案:C

第4题:

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. AnnouncementService

B. AnnouncementClient

C. DiscoveryClient

D. HttpListener


参考答案:A

第5题:

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.


参考答案:A

第6题:

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.0

B. Windows Process Activation Services (WAS)

C. A Windows Forms application

D. A Windows Service


参考答案:D

第7题:

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.


参考答案:C

第8题:

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.


参考答案:C

第9题:

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.


参考答案:D

第10题:

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. NetTcpContextBinding

B. BasicHttpContextBinding

C. NetTcpBinding

D. NetMsmqBinding


参考答案:B

更多相关问题