单项选择题
A client application calls a Windows Communication Foundation (WCF) service with a proxy class that was generated by Visual Studio.The service binding was changed from wsHttpBinding to basicHttpBinding. The method signatures in the service contract are changed.After these changes, the client application receives errors when calling methods on the service.You need to ensure that the client can invoke methods on the service successfully.
What should you do?()
A. Update the configuration file to use basicHttpBinding.
B. Enable anonymous authentication for the service.
C. Copy the configuration file elements under the
D. Update the service reference.
相关考题
-
单项选择题
A Windows Communication Foundation (WCF) service is hosted in Microsoft Internet Information Services (IIS). You are preparing the configuration file for production deployment. You need to set up tracing so that an administrator can adjust the System.ServiceModel trace level without causing the ASP.NET host application domain to restart. You need to ensure that tracing is turned off by default. What should you do?()
A.
B.
C.
D. -
单项选择题
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 that contains the following service contract.[ServiceContract()]public interface IPaymentService{ [OperationContract()] void RecordPayments(Person person);}public class Person{ ... }public class Employee : Person{ ... }public class Customer : Person{ ... }You need to ensure that RecordPayments can correctly deserialize into an Employee or a Customer object. What should you do?()
A. Add the following KnownType attribute to the Employee class and to the Customer class. [KnownType(GetType(Person))]
B. Implement the IExtensibleDataObject interface in the Person class.
C. Implement the IExtension(ofType(T)) interface in the Person class.
D. Add the following KnownType attributes to the Person class. [KnownType(GetType(Employee))] [KnownType(GetType(Customer))]
