单项选择题

A. Make sure that service class has a default constructor. Add a public read-only property with the name ServiceHost that returns an instance of the MovieServiceHost class.
B. Create a factory for the custom service host. Name the factory MovieServiceHostFactory. In the web.config file, add the following attribute to the element within the element. factory="MovieServiceFactory"
C. Create a factory for the custom service host. Name the factory MovieServiceHostFactory. In the .svc file, add the following line. <%@ServiceHost Service="MovieServiceHostFactory" Language="C#">
D. Decorate the custom service host class with the following line. [System.ServiceModel.Activation.ServiceActivationBuildProvider()]

相关考题

单项选择题 You are developing a Windows Comunication Foundation (WCF) service that is used to check the status of orders placed by customers.The following code segment is part of your service.(Line numbers are included for reference only.) 01 [ServiceContract] 02 public interface IStatus 03 { 04 [OperationContract] 05 int GetOrderStatus(string orderNumber); 06 } 07 08 class OrderService : IStatus 09 { 10 public int GetOrderStatus(string orderNumber) 11 { 12 ... 13 } 14 } 15 16 class Program 17 { 18 static void Main(string[] args) 19 { 20 21 22 host.Open(); 23 ... 24 } 25 }You need to ensure that the service always listens at net.pipe://SupplyChainServer/Pipe. What should you do?()

单项选择题 You develop a Windows Communication Foundation (WCF) service. It is used exclusively as an intranet application and is currently unsecured. You need to ensure that the service meets the following requirements: The service now must be exposed as an Internet application. The service must be secured at the transport level. Impersonation and delegation cannot be enabled. What should you use? ()

单项选择题 You are creating an application using Visual Studio 2010. The application consumes a Windows Communication Foundation (WCF) service.You are adding a service reference to the WCF service. You need to ensure that the generated proxy does not block the calling thread when executing a service method. What should you do when adding the service reference? ()