Microsoft TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4 - 70-513 Exam Practice Test

You are using tracing to diagnose run-time issues when you look at the traces for the service in Svc Trace viewer exe, you see what is shown in the exhibit (Click the Exhibit button)

The exception trace is selected in Svc Trace reviewer exe.
You need to interpret the trace results to determine where the error occurred and what to do next.
What should you do?
Correct Answer: A
A Windows Communication Foundation (WCF) service listens for messages at net
tcpilwwwcontoso.comMMyService.
It has a logical address at http/Iwwwcontosocorn)MyService
The configuration for the WCF client is as follows
<endpoint addressrhTttpllwwwcontosocom/MyService"
bindinge"netTc pBinding"
bindingConfiguraton-NetTc pBinding_lMyService
contract="ServiceReference 1. IMyServce'
name='NetTcpBinding_lllyService"/>v
The generated configuration does not provide enough information for the client to communicate with the server.
You need to update the client so that it can communicate with the server what should you do
Correct Answer: A
You are maintaining a Windows Communication Foundation (WCF) service that uses a custom UserNamePassword class to authenticate clients. The service certificate is hosted in the deployment server store for trusted root certificate authorities and has a Subject value of TaxServiceKey. Other service certificates hosted on the server also use TaxServiceKey as a Subject value.
You need to ensure that the service identifies itself with a certificate whose subject name and distinguished names are TaxServiceKey.
Which code segment should you use?
Correct Answer: B
You are developing a Windows Service. The Windows Service will host a Windows Communication Foundation (WCF) service.
The Windows Service class will inherit from ServiceBase.
You need to ensure that the WCF service starts when the Windows Service is restarted.
What should you do in the Windows Service class?
Correct Answer: A
You develop a Windows Communication Foundation (WCF) service. You enable all performance counters and run multiple calls to the service.
The service must isolate session data for each user.
You need to monitor the instancing behavior used in the service.
Which performance counter should you monitor?
Correct Answer: C
Your Windows Communication Foundation (WCF) client application uses HTTP to communicate with the service.
You need to enable message logging and include all security information such as tokens and nonces in logged messages.
What should you do?
Correct Answer: C
You are creating a Windows Communication Foundation (WCF) service that is implemented as folks. (Line numbers are included for reference only.)
01 <ServiceContract()
02<ServiceBehaior(lncludeExceptionDetailInFaults: Time)>
03Public Class OrderService
04
05eCNperationCortracto()>
O6Putdic Sub Submit Order(ByVal anOrder As Order)
07
08Try
09. 10Catch ex As D wide By Zero Exception 11 12End Try 13End Sub 14 1 5End Class
You need to ensure that the sack trace details of the exception are not included in the error information sent to the client. What should you do?
Correct Answer: C
A Windows Communication Foundation (WCF) service implements a contract with one-way and requestreply 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(lSimplexDatagramRouter),
04 new NetTcpBinding0, "net.tcp:/flocalhostlRouter"
05);
06 List <ServiceEndpoints lep new List <ServiceEndpoint>0;t
07 lep.Add(
08 new ServiceEndpoint(
09 ContractDescription.GetContract(
10 typeof(lSimplexDatagramRouter)
11),
12 new NetTcpBinding0,
13 new EndpointAddress|'nettcp://localhost: 8080/Logger")
14)
15);
16 RoutingConfiguration rc new RoutingConfigurationO;
17 FilterTable.Add(new MatchAilMessageFilterO, 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?
Correct Answer: A
You are developing a client application that consumes a Windows Communication Foundation (WCF) service.
You use the svcutil.exe utility to create a proxy for the service.
You use the svcutil.exe switches that generate asynchronous calls. GetFlight is a service operation that takes no parameters and returns a string. The GetFlightCallback method must be called when the service operation returns.
You create an instance of the client proxy with the following code.
var client = new TravelServiceClient();
You need to ensure that a callback is received when the GetFlight operation is called asynchronously.
Which code segment should you use?
Correct Answer: D
You are using tracing to diagnose run-time issues when you look at the traces for the service in Svc Trace viewer exe, you see what is shown in the exhibit (Click the Exhibit button)

The exception trace is selected in Svc Trace reviewer exe.
You need to interpret the trace results to determine where the error occurred and what to do next.
What should you do?
Correct Answer: A