nerdexam
Microsoft

70-513 · Question #303

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…

The correct answer is B. Change line 03 as follows. See the full explanation below for the reasoning.

Question

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<ServiceEndpoint> lep = new List<ServiceEndpoint>(); 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?

Options

  • AChange line 03 as follows:
  • BChange line 03 as follows:
  • CChange line 10 as follows:
  • DChange line 10 as follows:

How the community answered

(66 responses)
  • A
    3% (2)
  • B
    79% (52)
  • C
    6% (4)
  • D
    12% (8)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice