web analytics

Free Share The Newest Microsoft MCTS Exam Questions And Answers From PassLeader

[Pass Ensure VCE Dumps] PassLeader 341q 70-513 Exam VCE Dumps For Free Download With 100 Percent Pass Ensure (21-40)

How to pass the newest 70-513 exam? What new questions are on the latest 70-513 exam? PassLeader’s best 70-513 VCE and PDF exam dumps/70-513 sample questions will tell you all about the 70-513 exam. For all PassLeader’s 341q 70-513 exam questions are the newest and covered all new added questions and answers, which will help you 100% passing exam. And we PassLeader will continue update 70-513 exam questions and answers, you will never fail the 70-513 exam. Hurry up and get the free VCE Player with your premium 70-513 VCE dumps from passleader.com now!

keywords: 70-513 exam,341q 70-513 exam dumps,341q 70-513 exam questions,70-513 pdf dumps,70-513 practice test,70-513 vce dumps,70-513 study guide,70-513 braindumps,TS: Windows Communication Foundation Development with Microsoft .NET Framework 4 Exam

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:


http://www.passleader.com/70-513.html

QUESTION 31
You are developing a Windows Communication Foundation (WCF) service. One of the parameters used with the service operations is a security token. The security token is not sensitive. The monitoring software tracks security tokens and can read tokens in clear text only. The company security policy requires that you validate all clear text data passed over the corporate network. You need to ensure that the service verifies that the security token is not changed during transit. What should you do?

A.    For all the security-sensitive members, set the ProtectionLevel parameter of the MessageBodyMember or MessageHeader attribute to EncryptAndSign.
B.    Implement IEndpointldentityProvider in the message contract class.
C.    Implement ISecureConversationSession in the message contract class.
D.    For all the security-sensitive members, set the ProtectionLevel parameter of the MessageBodyMember or MessageHeader attribute to Sign.

Answer: D

QUESTION 32
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:
string oid Deleteltems(string id);
You need to configi.re WCF to ci this method when the client calls the service with the HTTP DRETE operation. What should you do?

A.    Add the Weblnvoke(UriTemplate = “/Items/(idy,Method=”DELETE”) attribute to the operation
B.    Add the HttpDelete tribute to the operation
C.    Replace the sting parameter with a RemovedActivityAction parameter
D.    Replace the return type with RemovedActivityktion

Answer: A

QUESTION 33
You develop a Windows Communication Foundation (WCF) RESTful service that provides media streaming services. The service includes the following code. (Line numbers are included for reference only.) The service must return an XML response. You need to apply the correct attribute to AddMediaTitle method. Which code segment should you insert at line 05?

A.    [WebInvolce(ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped)]
B.    [WebInvoice (ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle .Bare) ]
C.    [WebInvolce (Method= “POST”) ]
D.    [WebInvoice]

Answer: A

QUESTION 34
An existing Windows Communication Foundation (WCF) service uses basicHttpBinding. You are releasing updates to the service and the client application. You need to enable the client application to flow transactions to the service. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

A.    Change to a custom binding that has the httpTransport, textMessageEndcoding, and transactionFlow binding elements in this order.
B.    Change to a custom binding that has the transactionFlow, textMessageEncoding, and httpTransport binding elements in this order.
C.    Change the binding to use wsHttpBinding.
D.    Change the binding to use basicHttpContextBinding.

Answer: BC

QUESTION 35
You are developing a client application that consumes a Windows Communication Foundation (WCF) service. You use the svcutil.exe utility to create a proxy for the service. You use the svcutil.exe switches that generate asynchronous calls. GetFlight is a service operation that takes no parameters and returns a string. The GetFlightCallback method must be called when the service operation returns. You create an instance of the client proxy with the following code:
var client = new TranvelServiceClient();
You need to ensure that a callback is received when the GetFlight operation is called asynchronously. Which code segment should you use?

A.    client.BeginGetFlight(GetFlightCallback, null);
client.GetFlight();
B.    client.GetFlight();
client.BeginGetFlight(GetFlightCallback, null);
C.    client.GetFlightCompleted += new EventHandler<GetFlightCompletedEventArgs>(GetFlightCallback);
client.GetFlightAsync();
D.    IAsyncResult asyncResult = client.BeginGetFlight(GetFlightCallback, client);
client.EndGetFlight(asyncResult);

Answer: C

QUESTION 36
You are developing a Windows Communication Foundation (WCF) service to provide an in-memory cache for many Web applications. The service contract is defined as follows. (Line numbers are included for reference only.) You need to ensure that all users share the cache. Which code segment should you insert at line 07?

A.    [ServiceBehavior(TransactionIsolationLevel = IsolationLevel.RepeatableRead)]
B.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
C.    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
D.    [ServiceBehavior(TransactionIsolationLevel = IsolationLevel.ReadComitted)]

Answer: B

QUESTION 37
A Windows Communication Foundation (WCF) solution exposes the following service over a TCP binding.(Line numbers are included for reference only.)
01 [ServiceContract]
02 [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]
03 public class DataAccessService
04 {
05 [OperationContract]
06 public void PutMessage(string message)
07 {
08 MessageDatabase.PutMessage(message);
09 }
10 [OperationContract]
11 pubic string[] SearchMessages(string search)
12 {
13 return MessageDatabase.SearchMessages(search);
14 }
15 }
MessageDatabase supports a limited number of concurrent executions of its methods. You need to change the service to allow up to the maximum number of executions of the methods of MessageDatabase. This should be implemented without preventing customers from connecting to the service. What should you do?

A.    Change the service behavior as follows.
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.Single)]
B.    Change the service behavior as follows.
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Single, InstanceContextMode = InstanceContextMode.PerSession)]
C.    Add a throttling behavior to the service, and configure the maxConcurrentCalls.
D.    Add a throttling behavior to the service, and configure the maxConcurrentSessions.

Answer: C

QUESTION 38
You are developing a Windows Communication Foundation (WCF) service. You need to enable security auditing for all events. What should you do?

A.    Set the serviceAuthorizationAuditLevel setting to Success and the messageAuthenticationAuditLevel setting to Success.
B.    Set the messageAuthenticationAuditLevel setting to Success and the auditLogLocation setting to Application.
C.    Set the serviceAuthorizationAuditLevel setting to SuccessAndFailure and the messageAuthenticationAuditLevel setting to SuccessAndFailure.
D.    Set the messageAuthenticationAuditLevel setting to SuccessAndFailure and the auditLogLocation setting to Security.

Answer: C

QUESTION 39
You are debugging a Windows Communication Foundation (WCF) service. The service uses signed and encrypted messages. You need to configure logging so that you can read the contents of the messages. What should you do?

A.    Set maxSizeMessagesToLog to 10.
B.    Set logMessageAtServiceLevel to true.
C.    Set maxMessagesToLog to 10.
D.    Set logMessageAtTransportLevel to true.

Answer: B

QUESTION 40
You are hosting a Windows Communication Foundation (WCF) service at http://www.contoso.com for a law enforcement agency. The agency adds operations to support sending biometric fingerprint data via non-buffered streaming. The service data is not routed between intermediaries. The WCF binding you are using by default does not support encryption. You need to ensure that fingerprint data is not disclosed when it is passed over the network. What should you do?

A.    Use basicHttpBinding with message security to https://www.contoso.com.
B.    Use basicHttpBinding over transport security at https://www.contoso.com.
C.    Use wsHttpBinding over message security at https://www.contoso.com.
D.    Use wsHttpBinding over transport security at http://www.contoso.com.

Answer: B


http://www.passleader.com/70-513.html