单项选择题
A. In the client configuration, change the value of the address attribute to net.tcp://www.contoso.com/MyService
B. In the client configuration, change the value of the address attribute to net.tcp://www.contoso.com/MyService listen=http://www.contoso.com/MyService.
C. After instantiating the client and before invoking any service operation, add this line of code. EndpointBehaviors.Add(new EndpointDiscoveryBehavior(){ Enabled = true });
D. After instantiating the client and before invoking any service operation, add this line of code. client.Endpoint.Behaviors.Add(new ClientViaBehavior(new Uri("net.tcp://www.contoso.com/IMyService")));
单项选择题 You are modifying an existing Windows Communication Foundation (WCF) service that is defined as follows:[ServiceContract]public interface IMessageProcessor { [OperationContract] void ProcessMessages();}public class MessageProcessor: IMessageProcessor { public void ProcessMessage(); SubmitOrder();}SubmitOrder makes a call to another service. The ProcessMessage method does not perform as expected under a heavy load.You need to enable processing of multiple messages. New messages must only be processed when the ProcessMessage method is not processing requests,or when it is waiting for calls to SubmitOrder to return.Which attribute should you apply to the MessageProcessor class?()
单项选择题 A Windows Communication Foundation (WCF) service implements a contract with one-way and request-reply operations.The service is exposed over a TCP transport. Clients use a router to communicate with the service. The router is implemented as follows. (Line numbers are included for reference only.) 01 ServiceHost host = new ServiceHost(typeof(RoutingService)); 02 host.AddServiceEndpoint( 03 typeof(ISimplexDatagramRouter), 04 new NetTcpBinding(), "net.tcp://localhost/Router" 05 ); 06 List lep = new List(); 07 lep.Add( 08 new ServiceEndpoint( 09 ContractDescription.GetContract( 10 typeof(ISimplexDatagramRouter) 11 ), 12 new NetTcpBinding(), 13 new EndpointAddress("net.tcp://localhost:8080/Logger") 14 ) 15 ); 16 RoutingConfiguration rc = new RoutingConfiguration(); 17 rc.FilterTable.Add(new MatchAllMessageFilter(), lep); 18 host.Description.Behaviors.Add(new RoutingBehavior(rc));Request-reply operations are failing. You need to ensure that the router can handle one-way and request-reply operations.What should you do?()
单项选择题 A Windows Communication Foundation (WCF) service uses the following service contract. [ServiceContract] public interface IService{ [OperationContract] string Operation1(string s);}You need to ensure that the operation contract Operation1 responds to HTTP POST requests.Which code segment should you use?()