最新的Microsoft TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4 - 070-513免費考試真題
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?
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
You are creating a Windows Communication Foundation (WCF) service based on WSHttpBinding. New audit requirements dictate that callers must be authenticated on every call to ensure that their credentials have not been revoked.
You need to ensure that the service will not cache the security request token.
What should you do?
You need to ensure that the service will not cache the security request token.
What should you do?
正確答案: B
You implement a Windows Communication Foundation (WCF) service.
You must process all of the valid SOAP messages that the service receives.
What should you do?
You must process all of the valid SOAP messages that the service receives.
What should you do?
正確答案: A
You are consuming a Windows Communication Foundation (WCF) service. The service interface is defined as follows.
[DataContract(Namespace = "")]
public class Item
{
...
}
[ServiceContract(Namespace = "")]
public interface ICatalog
{
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/Item")]
Item UpdateItem(Item item);
}
The client application receives a WebResponse named response with the response from the service.
You need to deserialize this response into a strongly typed object representing the return value of the method.
Which code segment should you use?
[DataContract(Namespace = "")]
public class Item
{
...
}
[ServiceContract(Namespace = "")]
public interface ICatalog
{
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/Item")]
Item UpdateItem(Item item);
}
The client application receives a WebResponse named response with the response from the service.
You need to deserialize this response into a strongly typed object representing the return value of the method.
Which code segment should you use?
正確答案: B
You develop a Windows Communication Foundation (WCF) service. It is used exclusively as an intranet application and is currently unsecured.
You need to ensure that the service meets the following requirements:
The service now must be exposed as an Internet application.
The service must be secured at the transport level.
Impersonation and delegation cannot be enabled.
What should you use?
You need to ensure that the service meets the following requirements:
The service now must be exposed as an Internet application.
The service must be secured at the transport level.
Impersonation and delegation cannot be enabled.
What should you use?
正確答案: C
DRAG DROP
You use Visual Studio to develop a Windows Communication Foundation (WCF) service. The service is not hosted.
You cannot use the WcfTestClient.exe tool to test the service.
You need to test the service from a separate Visual Studio solution that contains a simple console application.
Which four actions should you perform in sequence? (To answer, move the appropriate four actions from the list of actions to the answer area and arrange them in the correct order.)

You use Visual Studio to develop a Windows Communication Foundation (WCF) service. The service is not hosted.
You cannot use the WcfTestClient.exe tool to test the service.
You need to test the service from a separate Visual Studio solution that contains a simple console application.
Which four actions should you perform in sequence? (To answer, move the appropriate four actions from the list of actions to the answer area and arrange them in the correct order.)

正確答案:

You are developing a Windows Communication Foundation (WCF) service that reads messages from a public non-transactional MSMQ queue.
You need to configure the service to read messages from the failed-delivery queue.
Which URI should you specify in the endpoint configuration settings of the service?
You need to configure the service to read messages from the failed-delivery queue.
Which URI should you specify in the endpoint configuration settings of the service?
正確答案: C
You create a Windows Communication Foundation (WCF) service and deploy it with wsHttpBinding and message security enabled.
You create an intermediate WCF service for logging messages sent to the primary service. The intermediate service is called via the clientVia endpoint behavior.
The primary service is receiving malformed data from a client application.
You need to enable inspection of the malformed data and prevent message tampering.
What should you do?
You create an intermediate WCF service for logging messages sent to the primary service. The intermediate service is called via the clientVia endpoint behavior.
The primary service is receiving malformed data from a client application.
You need to enable inspection of the malformed data and prevent message tampering.
What should you do?
正確答案: C
DRAG DROP
You develop a Windows Communication Foundation (WCF) service that is hosted within a console application. The service implements the IRegistrationService interface in a class named RegistrationService. The service uses the following endpoint URL:
http://localhost:8080/registrationservice/basic
You need to configure the console application to host the service.
How should you complete the relevant markup? (To answer, drag the appropriate markup segment to the correct location in the answer area. Each segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

You develop a Windows Communication Foundation (WCF) service that is hosted within a console application. The service implements the IRegistrationService interface in a class named RegistrationService. The service uses the following endpoint URL:
http://localhost:8080/registrationservice/basic
You need to configure the console application to host the service.
How should you complete the relevant markup? (To answer, drag the appropriate markup segment to the correct location in the answer area. Each segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

正確答案:

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?
正確答案: D