live chatMcAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Pass4Test 10%OFF Discount Code

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

QUESTION NO: 1
The following is an example of a SOAP envelope.
<s:Enelope xmlns:se'http://schemas.xmlsoporg/soap/envelopef'>
<s: Header> <h:Storeld xmlns:he"http:/!www.contoso.com"s
<Ih: Storeld>
</s:Header>
<s:Body>
<CheckStockRequest xmlnsehttp://wwwcorIosocom">
<ltemld>2469 <Iltenld>4
</CheckStoc kRequest>
<Is: Body>
<Is: Envelope>
You need to create a message contract that generates the SOAP envelope.
1 which code segment should you use?
Correct Answer: B
QUESTION NO: 2
You are creating a Windows Communication Foundation (WCF) service that implements operations in a RESTful manner. You need to add a delete operation.
You implement the delete method as follows.
Sub DeleteItems (ByVol id As String)
You need to configure WCF to call this method when the client calls the service with the HTTP DELETE operation.
What should you do?
Correct Answer: A
QUESTION NO: 3
A Windows Communication Foundation (WCF) service has the following contract.

This is one of several service contracts hosted by your application. All endpoints use SOAP
1.2 bindings with WS-Addressing 1.0. The System.ServiceModel.MessageLogging trace source in the system.diagnostics configuration section is configured with one listener.
You need to make sure that only the messages that are returned from the DoWork operation are logged.
Which XML segment should you add to the
system.serviceModel/diagnostics/messageLogging/filters configuration element?
Correct Answer: A
QUESTION NO: 4
You create a service and deploy it on a network in a building named Building1. You will deploy the service to Building2.
The service in Building1 is configured using the following discovery scopes.
<scopes>
<add
scope="http://contoso.com/Chicago/Building1"/>
<add
scope="ldap:///ou=Building1,ou=Chicago,o=contoso,c=us"/>
</scopes>
The service in Building2 will be configured using the following discovery scopes.
<scopes>
<add
scope="http://contoso.com/Chicago/Building2"/>
<add
scope="ldap:///ou=Building2,ou=Chicago,o=contoso,c=us"/>
</scopes>
You need to ensure that the client application can discover the service in Building1 or the service in Building2.
Which scopes should you add to the client configuration file?
Correct Answer: D
QUESTION NO: 5
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: A
QUESTION NO: 6
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
Correct Answer: D
QUESTION NO: 7
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?
Correct Answer: B
QUESTION NO: 8
You have a Windows Communication Foundation (WCF) service.
The service has issues with performance when it receives messages on a specific endpoint. The service must collect the minimum number of performance counters to diagnose the message issues.
You need to configure the service.
In the web.config file for the service, what should you do?
Correct Answer: D
QUESTION NO: 9
A Windows Communication Foundation (WCF) solution uses the following contract to share a message across its clients. (Line numbers are included for reference only.)

The code for the service class is as follows.

The service is self-hosted. The hosting code is as follows.

You need to ensure that all clients calling GetMessage will retrieve the updated string if the message is updated by any client calling PutMessage.
What should you do?
Correct Answer: A
QUESTION NO: 10
DRAG DROP
You have a client application that consumes a Windows Communication Foundation (WCF) service. The service contains a class named RegistrationService. The RegistrationService class contains two methods named SubmitRegistration and GetRegistrations.
The service has the following requirements:
- The client application must call the SubmitRegistration method synchronously.
- The client application must call the GetRegistrations method asynchronously.
You need to complete the client-side code to call the WCF service.
Which six code segments should you use in sequence? (To answer, move the appropriate six code segments from the list of code segments to the answer area and arrange them in the correct order.)
Correct Answer:
QUESTION NO: 11
A Windows Communication Foundation (WCF) solution uses the following contract to share a message across its clients.
(Line numbers are included for reference only.)
01 [ServiceContract]
02public interface ITeamMessageService
03{
04 [OperationContract]
05string GetMessage0;
07 [OperationContract]
08void PutMessage(string message);
09)
The code for the service class is as follows
10 public class TeamMessageService: ITeamMessageService
1 1{
12Guid key = GuicLNewGuidO;
1 3string message = "Today's Message":
1 4public string GetMessage()
i5{
16 return stringFormat("Message:{0} Key:{1}",
message, Key);
1n
1 9public void PutMessage(string message)
20{
2lthismessage = message;
22}
23)
The senvice is self-hosted. The hosting code is as follows.
24 ServiceHost host =
25BasicHttpBinding binding =
new BasicHttpBinding(BasicHttpSecuntyMode.None):
26 host AddServiceEndpoint(
HMyApplication lTeamMessageService, binding,
"http:/Ilocalhost: 12345w);
27 host Open0;)
You need to ensure that all clients calling GetMessage will retrieve the same string, even if the message is updated by clients calling PutMessage
What should you do?
Correct Answer: B
QUESTION NO: 12
You are developing a Windows Communication Foundation (WCF) service. Client applications require reliable sessions to access the service. Users report that they receive
ServerTooBusyException errors when their client application tries to establish a session. You need to ensure that the service can handle a minimum of 30 client connection requests.
Which ReliableSessionBindingElement property should you configure?
Correct Answer: C