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

Question 1
You are modifying a Windows Communication Foundation (WCF) service that allows customers to update financial data. The service currently requires a transaction from the client application and is working correctly. The service contract is defined as follows. (Line numbers are included for reference only.)

The service must be modified so that client applications do not need to initiate a transaction when calling the operation. The service must use the client application's transaction if one is available. Otherwise it must use its own transaction.
You need to ensure that the service operation is always executed within a transaction.
What should you do?

Correct Answer: A
Question 2
You are developing an application to update a users social status. You need to consume the service using Windows Communication Foundation (WCF).
The client configuration is as follows.
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="SocialConfig">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic"
realm="Social API" />
</security>
</binding>
</webHttpBinding>
</bindings>
<client>
<endpoint address= " http:// contoso .com "
binding="webHttpBinding"
bindingConfiguration="SocialConfig"
ontract="ISocialStatus"
name="SocialClient" />
</client>
</system.serviceModel>
The service contract is defined as follows.
<ServiceContract()>
Public Interface ISocialStatus
<OperationContract()>
<WebInvoke(UriTemplate:="/statuses/update.xml?status={text}")>
Sub UpdateStatus(ByVal text As String)
End Interface
Which code segment should you use to update the social status?

Correct Answer: C
Question 3
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?

Correct Answer: B
Question 4
You are creating a client application and configuring it to call a Windows Communication
Foundation (WCF) service. When the application is deployed, it will be configured to send
all messages to a WCF routing service.
You need to ensure that the application can consume the target service after the application is deployed.
What should you do?

Correct Answer: D
Question 5
You are creating a client application and configuring it to call a Windows Communication Foundation (WCF) service. When the application is deployed, it will be configured to send all messages to a WCF routing service.
You need to ensure that the application can consume the target service after the application is deployed.
What should you do?

Correct Answer: D
Question 6
An ASP NET application hosts a RESTful Windows Communication Foundation (WCF)
service at /ServiceslContoso.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' srcsIServices/Contoso. svc/js" /> You need to retrieve the debug version of the service JavaScript. What should you do?

Correct Answer: D
Question 7
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: D
Question 8
Four Windows Communication Foundation (WCF) services are hosted in Microsoft Internet Information Services (IIS). No behavior configuration exists in the web.config file.
You need to configure the application so that every service and endpoint limits the number of concurrent calls to 50 and the number of concurrent sessions to 25.
Which XML segment should you add to the system.serviceModel configuration section of the web.config file?

Correct Answer: A
Question 9
You are creating a Windows Communication Foundation (WCF) service. You do not want to expose the internal implementation at the service layer.
You need to expose the following class as a service named Arithmetic with an operation named Sum.
Public Class Calculator Public Function Add (ByVal x As Integer, ByVal y As Integer) As Integer End Function End Class Which code segment should you use?

Correct Answer: C
Question 10
DRAG DROP
You are creating a Windows Communication Foundation (WCF) service.
The service must be able to transmit messages back to the client application.
You need complete the web.config file for the service.
How should you complete the relevant markup? (To answer, drag the appropriate markup segments to the correct location or locations in the answer area. Each markup 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.)
Correct Answer:
Question 11
The endpoint of a Windows Communication Foundation (WCF) service uses basicHttpBinding for its binding. Your company's policies have changed to require that messages not be sent in clear text.
You must ensure that all messages are encrypted when traveling across the network.
What should you do?

Correct Answer: D