2016 June Microsoft Official New Released 70-513Q&As in GreatExam.com!
100% Free Download! 100% Pass Guaranteed!
Our PDF dumps of 70-513 exam is designed to ensure everything which you need to pass your exam successfully. At GreatExam, we have a completely customer oriented policy. We invite the professionals who have rich experience and expert knowledge of the IT certification industry to guarantee the PDF details precisely and logically. Our customers’ time is a precious concern for us. This requires us to provide you the products that can be utilized most efficiently.
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?
A. [OperationContract(IsOneWay=true, Action=”*”, ReplyAction=”*”)]
void PostData(Order data);
B. [OperationContract(IsOneWay=true, Action=”*”, ReplyAction = “*”)]
void PostData(BodyWriter data);
C. [OperationContract]
void PostData(BodyWriter data);
D. [OperationContract]
void PostData(Message data);
Answer: D
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?
A. <add xmlns:addr=”http://www.w3.org/2005/08/addressing”>
/addr:Action[text()=’http://contoso.com/lShipping/DoWorkResponse’]
</add>
B. <add xmlns:soap=”http://www.w3.org/2003/05/soap-envelope”>
/soap:Action[text()=’http://contoso.com/lShipping/DoWorkResponse’]
</add>
C. <add xmlns:addr=”http://www.w3.org/2005/08/addressing”>
/addr:Action[text()=`http://contoso.com/lShipping/DoWork’]
</add>
D. <add xmlns:soap=”http://www.w3.org/2003/05/soap-envelope”>
/soap:Action[text()=`http://contoso.com/lShipping/DoWork’]
</add>
Answer: A
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?
A. Configure the System.ServiceModel trace source in the system.diagnostics configuration
section. In the system.serviceModel configuration, add the following XML segment:
<diagnostics>
<messageLogging logEntireMessage=”true”
logMessagesAtServiceLeveI=”true”
logMessagesAtTransportLevel=”true” />
</diagnostics>
B. Configure the System.ServiceModel trace source in the system.diagnostics configuration
section. In the system.serviceModel configuration, add the following XML segment:
<diagnostics>
<messageLogging logEntireMessage=”true”
logMessagesAtServiceLeveI=”true” />
</diagnostics>
C. Configure the System.ServiceModel.MessageLogging trace source in the system.diagnostics
configuration section.
In the system.serviceModel configuration, add the following XML segment:
<diagnostics>
<messageLogging logEntireMessage=”true”
logMessagesAtServiceLeveI=”true”
logMessagesAtTransportLevel=”true” />
</diagnostics>
D. Configure the System.ServiceModel.MessageLogging trace source in the system.diagnostics
configuration section.
In the system.serviceModel configuration, add the following XML segment:
<diagnostics>
<messageLogging logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true” />
</diagnostics>
Answer: C
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?
A. [ServiceContract]
public interface IService
{
[OperationContract]
CustomerInformation GetCustomerInformation(Header header, int customerNumber);
}
[DataContract]
public class CustomerInformation
{
…
}
[MessageContract]
public class Header
{
[MessageHeader]
public string SecurityTag;
}
B. [ServiceContract]
public interface IService
{
[OperationContract]
CustomerInformation GetCustomerInformation(Header header, int customerNumber);
}
[MessageContract]
public class CustomerInformation
{
…
}
[MessageContract]
public class Header
{
[MessageHeader]
public string SecurityTag;
}
C. [ServiceContract]
public interface IService
{
[OperationContract]
CustomerInformation GetCustomerInformation(CustomerNumber request);
}
[DataContract]
public class CustomerInformation
{
…
}
[MessageContract]
public class CustomerNumber
{
[MessageHeader]
public string SecurityTag;
[MessageBodyMember]
public int CustomerNumberElement;
}
D. [ServiceContract]
public interface IService
{
[OperationContract]
CustomerInformation GetCustomerInformation(CustomerNumber request);
}
[MessageContract]
public class CustomerInformation
{
…
}
[MessageContract]
public class CustomerNumber
{
[MessageHeader]
public string SecurityTag;
[MessageBodyMember]
public int CustomerNumberElement;
}
Answer: D
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:
If you want to get more 70-513 exam preparation material, you can download the free 70-513 braindumps in PDF files on GreatExam. It would be great helpful for your exam. All the 70-513 dumps are updated and cover every aspect of the examination. Welcome to choose.
2016 Microsoft 70-513 exam dumps (All 341 Q&As) from GreatExam:
http://www.greatexam.com/70-513-exam-questions.html [100% Exam Pass Guaranteed!!!]