70-513 無料問題集「Microsoft TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4」
You are creating a Windows Communication Foundation (WCF) service that accepts messages from clients when they are started. The message is
defined as follows. <MessageContract()> Public Class Agent Public Property CodeName As String Public Property SecretHandshake As String End Class You have the following requirements:
The CodeName property must be sent in clear text. The service must be able to verify that the property value was not changed after being sent by the client.
The SecretHandshake property must not be sent in clear text and must be readable by the service.
What should you do?
defined as follows. <MessageContract()> Public Class Agent Public Property CodeName As String Public Property SecretHandshake As String End Class You have the following requirements:
The CodeName property must be sent in clear text. The service must be able to verify that the property value was not changed after being sent by the client.
The SecretHandshake property must not be sent in clear text and must be readable by the service.
What should you do?
正解:D
解答を投票する
You are developing a Windows Communication Foundation (WCF) service that will be hosted in Microsoft Internet Information Services (IIS) 7.0.
The service must be hosted in an IIS application named Info. You need to enable this service to be hosted in IIS by changing the web.config file.
Which XML segment should you add to the web.config file
The service must be hosted in an IIS application named Info. You need to enable this service to be hosted in IIS by changing the web.config file.
Which XML segment should you add to the web.config file
正解:C
解答を投票する
You are developing a new version of an existing message contract named CustomerDetailsVersion1.
The new version of the message contract must add a Department field of type String to the SOAP header.
You create a new class named GustomerDetailsVersion2 that inherits from CustomerDetailsVersion1.
You need to ensure that all client applications can consume the service.
Which code segment should you use?
The new version of the message contract must add a Department field of type String to the SOAP header.
You create a new class named GustomerDetailsVersion2 that inherits from CustomerDetailsVersion1.
You need to ensure that all client applications can consume the service.
Which code segment should you use?
正解:D
解答を投票する
You want to debug the Windows Communication Foundation (WCF) client and server interaction through message and application tracing.
You need to correlate traces generated on the client and the server.
Which XML segment should you add to the system. diagnostics configuration element in the client and server application configuration file?
You need to correlate traces generated on the client and the server.
Which XML segment should you add to the system. diagnostics configuration element in the client and server application configuration file?
正解: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?

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?
正解:B
解答を投票する
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?
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?
正解:C
解答を投票する
A Windows Communication Foundation (WCF) solution uses two services to manage a shopping cart. Service A processes messages containing line items that total between $0 and $500. Service B processes messages containing line items that total more than $500.
All messages are of equal importance to the business logic.
You need to route incoming messages to the appropriate services by using WCF routing.
Which two message filters should you add to the router? (Each correct answer presents part of the solution. Choose two.)
All messages are of equal importance to the business logic.
You need to route incoming messages to the appropriate services by using WCF routing.
Which two message filters should you add to the router? (Each correct answer presents part of the solution. Choose two.)
正解:C、D
解答を投票する
You develop a Windows Communication Foundation (WCF) service that uses basic authentication for client credentials. This service is currently configured to use message security.
The service is hosted on a server in workgroup mode.
Users report that their passwords are stolen when they use public computers. You need to ensure that messages are secure and users are authenticated.
You prevent the service from being called over HTTP through Microsoft Internet Information Services (IIS) configuration.
What should you do next?
The service is hosted on a server in workgroup mode.
Users report that their passwords are stolen when they use public computers. You need to ensure that messages are secure and users are authenticated.
You prevent the service from being called over HTTP through Microsoft Internet Information Services (IIS) configuration.
What should you do next?
正解:A
解答を投票する
You are developing a client that sends several types of SOAP messages to a Windows Communication
Foundation (WCF) service method named PostData PostData is currently defined as follows
<OperationContract>
Sub PostData(Byval data As Order) You need to modify PostData so that it can receive any SOAP message.
Which code segment should you use?
Foundation (WCF) service method named PostData PostData is currently defined as follows
<OperationContract>
Sub PostData(Byval data As Order) You need to modify PostData so that it can receive any SOAP message.
Which code segment should you use?
正解:D
解答を投票する
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.
<script type="text/javaScript" src="/Services/Contoso.svc/js" />
You need to retrieve the debug version of the service JavaScript.
What should you do?
<script type="text/javaScript" src="/Services/Contoso.svc/js" />
You need to retrieve the debug version of the service JavaScript.
What should you do?
正解:D
解答を投票する
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.
<script type="text/3avaScript" src="/Secvices/Contoso.svc/js" />
You need to retrieve the debug version of the service JavaScript.
What should you do?
<script type="text/3avaScript" src="/Secvices/Contoso.svc/js" />
You need to retrieve the debug version of the service JavaScript.
What should you do?
正解:D
解答を投票する
You are developing a Windows Communication Foundation (WCF) service to replace an existing A5MX Web service.
The WCF service contains the following code segment. (Line numbers are included for reference only.)

The existing Web service returns the EmployeeID as an attribute of the EmployeeInfo element in the response XML.
You need to ensure that applications can consume the service without code changes in the client.

The WCF service contains the following code segment. (Line numbers are included for reference only.)

The existing Web service returns the EmployeeID as an attribute of the EmployeeInfo element in the response XML.
You need to ensure that applications can consume the service without code changes in the client.

正解:C
解答を投票する
You are creating a Windows Communication Foundation (WCF) service that uses claims-based authorization. The following code retrieves the correct claim set.
var claims = ServiceSecurityContext.Current.
AuthorizationContext.ClaimSets[0];
You need to validate that the requesting client application has included a valid DNS value in the claim.
Which code segment should you use to retrieve the claim for validation?
var claims = ServiceSecurityContext.Current.
AuthorizationContext.ClaimSets[0];
You need to validate that the requesting client application has included a valid DNS value in the claim.
Which code segment should you use to retrieve the claim for validation?
正解:D
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
A Windows Communication Foundation (WC9 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 impemented as follows.
(Line numbers are included for reference only.)
01 Dim host As ServiceHost = 02 New ServiceHost(GetType(RoutingService)) 03 hostAddServiceEndpoint(
04 GetType(lSimplexDatagramRouter),
05 New NetTcpBinding0, "net.tcp://localhostlRouter"
06)
07 Dim lep As List(Of ServiceEndpoint) =
08 New List(Of SenviceEndpointx)
09 lepAdd(
10 New ServiceEndpoint(
11 CortractDescription.GetContract(
12 GetType(lSimplexDatagramRouter)
13)1
14 New NetTcpBinding0,x
15 New EndpointAddressf'nettcp://localhost:8080/Logger')
16)
17)
18 Dim rc As RoutingConfiguration = New RoutingConfiguration()
19 rc . FitterTable.Add(New Matctf4llMessageFilter0, lep)
20 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?
The service is exposed over a TCP transport Clients use a router to communicate with the service. The router is impemented as follows.
(Line numbers are included for reference only.)
01 Dim host As ServiceHost = 02 New ServiceHost(GetType(RoutingService)) 03 hostAddServiceEndpoint(
04 GetType(lSimplexDatagramRouter),
05 New NetTcpBinding0, "net.tcp://localhostlRouter"
06)
07 Dim lep As List(Of ServiceEndpoint) =
08 New List(Of SenviceEndpointx)
09 lepAdd(
10 New ServiceEndpoint(
11 CortractDescription.GetContract(
12 GetType(lSimplexDatagramRouter)
13)1
14 New NetTcpBinding0,x
15 New EndpointAddressf'nettcp://localhost:8080/Logger')
16)
17)
18 Dim rc As RoutingConfiguration = New RoutingConfiguration()
19 rc . FitterTable.Add(New Matctf4llMessageFilter0, lep)
20 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?
正解:C
解答を投票する