单项选择题
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
相关考题
-
单项选择题
You are implementing a Windows Communication Foundation (WCF) client application that consumes the ICatalog and lCatalog2 service interfaces.You need to ensure that the client discovers services implementing these interfaces. The services may already be online or may come online within a 30 second time limit. How should you use WCF Discovery to accomplish this?()
A. Create one FindCriteria object for each interface and set the Duration of each FindCriteria to 30 seconds. Call the FindAsync method of the DiscoveryClient class twice, one time for each of the FindCriteria objects, to search for the services.
B. Create one FindCriteria object for each interface and set the Duration of each FindCnteria to two seconds. Create a loop that calls the Find method of the DiscoveryClient class to search for the services. Within each loop iteration, call the Find method of the DiscoveryClient class once for each of the FindCriteria objects. Run the loop until a service is found or 30 seconds pass.
C. Create a single FindCriteria object and add both interfaces to its ContractTypeNames collection. Set the criteria's Duration to two seconds. Create a loop that calls the Find method of the DiscoveryClient class to search for the services. Within each loop iteration, call the Find method of the DiscoveryClient class to search for the services Run the loop until a service is found or 30 seconds pass.
D. Create a single FindCritera object and add both interfaces to the ContractTypeNames collection. Set the Duration to 30 seconds and use the FindAsync method of the DiscoveryClient class to search for the services. -
单项选择题
An ASP.NET application hosts a RESTful Windows Communication Foundation (WCF) service at /Services/Contoso.svc.The service provides a JavaScript resource to clients. You have an explicit reference to the JavaScript in your page markup as follows.You need to retrieve the debug version of the service JavaScript. What should you do?()
A. In the <%@ ServiceHost %> header for /Services/Contoso.svc, set the Debug attribute to true.
B. In the <%@ Page %> header, set the Debug attribute to true.
C. In the script tag, add a debug attribute and set its value to true.
D. In the script tag, append debug to the src attribute. -
单项选择题
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
