Following questions and answers are all new published by Microsoft Official Exam Center: (The full version is in the end of the article!!!)

QUESTION 21
A Windows Communication Foundation (WCF) service has a callback contract.
You are developing a client application that will call this service.
You must ensure that the client application can interact with the WCF service.
What should you do?

A. On the OperationContractAttribute, set the AsyncPattern property value to true.
B. On the OperationContractAttribute, set the ReplyAction property value to the endpoint address of the client.
C. On the client, create a proxy derived from DuplexClientBase<TChannel>.
D. On the client, use GetCallbackChannel<T>.

Answer: C

QUESTION 22
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]
void PostData(Order data);
You need to modify PostData so that it can receive any SOAP message.
Which code segment should you use?

QUESTION 23
A Windows Communication Foundation (WCF) service has the following contract.
[ServiceContract(Namespace=”http://contoso.com”)]
public interface IShipping
{
[OperationContract]
string DoWork(int id);
}
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?

QUESTION 24
A Windows Communication Foundation (WCF) service only accepts messages that are signed and encrypted.
A client application is not receiving expected responses from the service.
You need to enable logging to verify that the messages from the client are signed and encrypted.
You also need to see what each message looks like before the message body is deserialized into a NET object.
What should you do?

QUESTION 25
A class named TestService implements the following interface:
[ServiceContract]
public interface ITestService
{
[OperationContract]
DateTime GetServiceTime();
}
TestService is hosted in an ASP.NET application.
You need to modify the application to allow the GetServiceTime method to return the data formatted as JSON.
It must do this only when the request URL ends in /ServiceTime.
What should you do?

A. Add this attribute to the GetServiceTime method.
[WebInvoke(Method=”POST”)]
In the web.config file, add this element to
system.serviceModel/behaviors/endpointBehaviors.
<behavior name=”Json”>
<enableWebScript />
</behavior>
In the web.config file, configure TestService in the system.serviceModel/services collection
as follows:
<service name=”TestService”>
<endpoint address=”/ServiceTime”
contract=”TestService”
behaviorConfiguration=”Json”
binding=”webHttpBinding” />
</service>
B. Add this attribute to the GetServiceTime method.
[WebInvoke(Method=”GET”,
UriTemplate=”/ServiceTime”,
ResponseFormat=WebMessageFormat.Json)]
In the web.config file, configure TestService in the system.serviceModel/services collection
as follows:
<service name=”TestService”>
<endpoint address=”/ServiceTime”
contract=”TestService”
binding=”webHttpBinding”/>
</service>
C. Add this attribute to the GetServiceTime method
[WebGet(
ResponseFormat=WebMessageFormat.Json,
UriTemplate=”/ServiceTime”)]
Create a new svc file named Jsonversion.svc with the following content.
<% @ServiceHost Service=”TestService”
Factory=”System.ServiceModel.ActivationWebServiceHostFactory” %>
D. Add this attribute to the GetServiceTime method.
[WebGet(UriTemplate=”Json)/ServiceTime”)]
Create a new .svc file named Jsonversion.svc with the following content
<% @ServiceHost Service=”TestService”
Factory=”System.ServiceModel.ActivationWebServiceHostFactory” %>

Answer: C

QUESTION 26
You are developing a Windows Communication Foundation (WCF) service.
The service operation takes a customer number as the only argument and returns information about the customer.
The service requires a security token in the header of the message.
You need to create a message contract for the service.
Which code segment should you use?

QUESTION 27
A Windows Communication Foundation (WCF) service that handles corporate accounting must be changed to comply with government regulations of auditing and accountability
You need to configure the WCF service to execute under the Windows logged-on identity of the calling application.
What should you do?

A. Within the service configuration, add a ServiceAuthorization behavior to the service, and set
ImpersonateCallerForAulOperations to true.
B. Within the service configuration, add a ServiceAuthenticationManager behavior to the service,
and set ServiceAuthenticationManagerType to Impersonate.
C. Within the service configuration, add a serviceSecurityAudit behavior to the service, and set
serviceAuthorizationAuditLevel to SuccessOrFailure
D. Within the service configuration, add a ServiceCredentials behavior to the service, and set
type to Impersonate

Answer: A

QUESTION 28
Your company has a Windows Communication Foundation (WCF) service at the URL http://services.contoso.com/OrderLookupService.svc.
The <system.serviceModel> section of the configuration file is as follows. (Line numbers are included for reference only.)
01 <system.serviceModel>
02 <behaviors>
03 <serviceBehaviors>
04 <behavior>
05 <serviceDebug includeExceptionDetailInFaults=”false” />
06 …
07 </behavior>
08 </serviceBehaviors>
09 </behaviors>
10 <serviceHostingEnvironment multipleSiteBindingsEnabled=”true” />
11 </system.serviceModel>
You need to ensure that the service publishes the WSDL description at http://services.contoso.com/OrderLookupService.svc?wsdl.
What should you do?

A. Change the serviceDebug element at line 05 as follows.
<serviceDebug includeExceptionDetailInFaults=”true” />
B. Insert the following element at line 06.
<serviceDiscovery>
<announcementEndpoints>
<endpoint name=”wsdlAnnouncement” kind=”udpAnnouncementEndpoint” />
</announcementEndpoints>
</serviceDiscovery>
C. Insert the following element at line 06.
<serviceMetadata httpGetEnabled=”true” />
D. Insert the following element at line 06.
<serviceMetadata httpGetEnabled=”false” />
Answer: C

QUESTION 29
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?

A. Set the ProtectionLevelAttribute on the service contract and
update the binding attribute in the endpoint element of the configuration file to wsHttpBinding.
B. Set the ProtectionLevelAttribute on the service contract and
update the bindingConfiguration attribute in the endpoint element of the configuration file to
webHttpBinding.
C. Set the PrincipalPermissionAttribute on the service contract and
update the binding attribute in the endpoint element of the configuration file to wsHttpBinding.
D. Set the PrincipalPermissionAttribute on the service contract and update the
bindingConflguration attribute in the endpoint element of the configuration file to
wsHttpBinding.

Answer: A

QUESTION 30
Hotspot Question
You are developing a Windows Communication Foundation (WCF) service.
You implement a data contract to pass complex data to and from the service.
The service includes the following code:
You need to verify the order in which the data is serialized.
For each of the following statements, select True if the statement is true. Otherwise select False.
Answer:

Now we are one step ahead in providing updated real exam dumps for 70-513. We provide 100% 70-513 exam passing guarantee as we will provide you same questions of 70-513 exam with their answers. Our Microsoft 70-513 questions answers are verified by experts.