web analytics

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

[Pass Ensure VCE Dumps] 100 Percent Pass 70-513 By Learning PassLeader Free 70-513 Study Guide (101-120)

New 70-513 Exam Questions Updated Today! PassLeader just released the latest Microsoft 70-513 pdf and vce exam dumps(Now Total 341q) with all new exam questions, which will help you 100% passing the newest 70-513 exam. This new questions are exactly the same as real test’s. Now visit passleader.com to get the newest 341q 70-513 pdf or vce exam dumps with 10% discount and FREE VCE TEST SOFTWARE!

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 101
An ASP.NET application hosts a RESTful Windows Communication Foundation (WCF) service at /Services/Contoso.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” src=”/Services/Contoso.svc/js” />
You need to retrieve the debug version of the service JavaScript. What should you do?

A.    In the <%@ ServiceHost %> header for /Services/Contoso.svc, set the Debug attribute to true.
B.    In the <%@ Page %> header, set the Debug attribute to true.
C.    In the script tag, add a debug attribute and set its value to true.
D.    In the script tag, append debug to the src attribute.

Answer: D

QUESTION 102
Your company has an existing Windows Communication Foundation (WCF) service that allows business partners to place orders. The service uses netMsmqBinding. You find that processing every order in its own transaction is causing a delay. You need to ensure that the service is configured to process multiple orders in one transaction. What should you do?

A.    Use <serviceThrottling> service behavior and set the maxConcurrentCalls attribute.
B.    Use <transactedBatching> endpoint behavior and set the maxBatchSize attribute.
C.    Use <dispatcherSynchronizationBehavior> endpoint behavior and set the maxPendingReceives attribute.
D.    Use <synchronousReceive> endpoint behavior.

Answer: B

QUESTION 103
You are adding a Windows Communication Foundation (WCF) service to an existing application. The application is configured as follows. (Line numbers are included for reference only.) You need to configure the service to publish the service metadata. Which two actions should you perform? (Each answer presents part of the solution. Choose two.)

A.    Add the following XML segment between lines 10 and 11:
<endpoint address=”” binding=”mexHttpBinding”
contract=”MetadataExchange” />
B.    Add the following XML segment between lines 10 and 11:
<endpoint address=”” binding=”basicHttpBinding”
contract=”MetadataExchange” />
C.    Add the following XML segment between lines 15 and 16:
<serviceDiscovery>
    <anouncementEndpoints>
       <endpoint address=””/>
    </anouncementEndpoints>
</serviceDiscovery>
D.    Add the following XML segment between lines 15 and 16:
<serviceMetadata httpGetEnabled=”true” />

Answer: AD

QUESTION 104
You are creating an application that consumes a Windows Communication Foundation (WCF) service. The service implements the IService contract. The client application contains the CallbackHandler class, which implements IServiceCallback. You need to ensure that a client proxy is created that can communicate with the service over a duplex channel. Which code segment should you use?

A.    var handler = new CallbackHandler();
var clientFactory = new DuplexChannelFactory<IService>(new WSHttpContextBinding());
var client = clientFactory.CreateChannel(new InstanceContext(handler), new EndpointAddress(“…”));
B.    var handler = new CallbackHandler();
var clientFactory = new DuplexChannelFactory<IService>(typeof(CallbackHandler), new WSDualHttpBinding());
var client = clientFactory.CreateChannel(new InstanceContext(handler), new EndpointAddress(“…”));
C.    var handler = new CallbackHandler();
var clientFactory = new DuplexChannelFactory<IService>(new WSHttpBinding());
var client = clientFactory.CreateChannel(new InstanceContext(handler), new EndpointAddress (“…”));
D.    var handler = new CallbackHandler();
var clientFactory = new DuplexChannelFactory<IService>(typeof(CallbackHandler), new WSDualHttpBinding());
var client = clientFactory.CreateChannel(new EndpointAddress(“…”));

Answer: D

QUESTION 105
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 ProtectionLevel property on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBinding.
B.    Set the ProtectionLevel property 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 bindingConfiguration attribute in the endpoint element of the configuration file to wsHttpBinding.

Answer: A

QUESTION 106
You are creating a Windows Communication Foundation (WCF) service. The service endpoints change frequently. On the service, you add a new ServiceDiscoveryBehavior to the Behaviors collection of the ServiceHost Description property. You need to ensure that client applications can communicate with the service and discover changes to the service endpoints. What should you do?

A.    Add a new ServiceDiscoveryBehavior to the Behaviors collection in the client application.
B.    Add a new AnnouncementClient to the Behaviors collection in the client application.
C.    Use the FindCriteria class and the UdpDiscoveryEndpoint class to set up the binding in the client application.
D.    Use the DiscoveryProxy class and the EndpointDiscoveryMetadata class to set up the binding in the client application.

Answer: C

QUESTION 107
You are developing an application that performs file backups in the background. The background application will host a Windows Communication Foundation (WCF) service and must be active as soon as the machine is running. The background application will not have a user interface. A front-end application will consume the WCF service and will provide the user interface. You need to choose a host environment for the WCF service. Which hosting environment should you choose?

A.    Microsoft Internet Information Services (IIS) 6.0
B.    Windows Process Activation Services (WAS)
C.    a Windows Forms application
D.    a Windows Service

Answer: D

QUESTION 108
You are developing a Windows Communication Foundation (WCF) service. The service needs to access out-of-process resources. You need to ensure that the service accesses these resources on behalf of the originating caller. What should you do?

A.    Set the value of ServiceSecurityContext.Current.WindowsIdentity.ImpersonationLevel to TokenlmpersonationLevel.Impersonation
B.    Set the value of ServiceSecurityContext.Current.Windowsldentity.ImpersonationLevel to TokenlmpersonationLevel.Delegation
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 PnncipalPermissionAttribute on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to wsHttpBinding

Answer: B

QUESTION 109
You are developing a Windows Communication Foundation (WCF) service to provide shopping cart support. ASP.NET compatibility mode is not enabled. The shopping cart information must be retained across user visits to the store until the user explicitly empties the cart or submits the cart contents to order. You need to implement the service as a DurableService. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A.    Use basicHttpBinding for both the client application and the service.
B.    Create the persistence provider database and configure the persistenceProvider element of the service behavior to point to that database.
C.    Use wsHttpContextBinding for both the client application and the service.
D.    In the method to add an item to the shopping cart, serialize the shopping cart contents after adding the current item and storing it in a Session variable.

Answer: BC

QUESTION 110
You have an existing Windows Communication Foundation (WCF) service that exposes a service contract over HTTP. You need to expose that contract over HTTP and TCP. What should you do?

A.    Add a net.tcp base address to the host.
B.    Add an endpoint configured with a netTcpBinding.
C.    Add an endpoint behavior named netTcpBehavior to the existing endpoint.
D.    Add a binding configuration to the existing endpoint named netTcpBinding.

Answer: B


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

QUESTION 111
You are developing a Windows Communication Foundation (WCF) client application. You instantiate a client class that inherits from ClientBase. The client instance must always be shut down in such a way that it can free up any resources it is referencing. You need to ensure that all exceptions are caught and the instance is always properly shut down. Which code segment should you use?

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Answer: D

QUESTION 112
You are developing a Windows Communication Foundation (WCF) service. You establish that the largest size of valid messages is 8,000 bytes. You notice that many malformed messages are being transmitted. Detailed information about whether each message is malformed must be logged. You need to ensure that this information is saved in XML format so that it can be easily analyzed. What should you add to the service configuration file?

A.    <messageLogging
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true”
maxMessagesToLog=”1000″
maxSizeOfMessageToLog=”8000″ />
B.    <messageLogging
logEntireMessage=”true”
logMalformedMessages=”false”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true”
maxMessagesToLog=”1000″ />
C.    <message Logging
logEntireMessage=”true”
logMalformedMessages””false”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true”
maxMessagesToLog=”1000″
maxSizeOfMessageToLog=”8000″ />
D.    <messageLogging
logEntireMessage=”true”
logMalformedMessages=”true”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true”
maxMessagesToLog=”1000″
maxSizeOfMessageToLog=”100000″ />

Answer: D
Explanation:
To log malformed message we should set logMalformedMessages=”true”, only D met this requirement

QUESTION 113
You are developing a Windows Communication Foundation (WCF) service that executes a long-running operation. The service is accessed from your business applications in a server transaction in which the client does not participate. You need to ensure that the transaction times out and aborts if the operation has not completed within 45 seconds. What should you do?

A.    Set the service binding sendTimeout attribute to 00:00:45.
B.    Apply [ServiceBehavior(TransactionTimeout=”00:00:45″)] to the service implementation.
C.    Set the service binding receiveTimeout attribute to 00:00:45.
D.    Apply [OperationBehavior(TransactionScopeRequired=false)] to the service operation.

Answer: B

QUESTION 114
You are developing a new version of an existing message contract named CustomerDetailsVersion1. The new version of the message contract must add a Department field of type String to the SOAP header. You create a new class named CustomerDetailsVersion2 that inherits from CustomerDetailsVersion1. You need to ensure that all client applications can consume the service. Which code segment should you use?

A.    [MessageContract]
public class CustomerDetailsVersion2 : CustomerDetailsVersion1
{
[MessageHeader(MustUnderstand = false)]
public string Department;
}
B.    public class CustomerDetailsVersion2 : CustomerDetailsVersion1
{
[MessageHeader(MustUnderstand = false)]
public string Department;
}
C.    [MessageContract]
public class CustomerDetailsVersion2 : CustomerDetailsVersion1
{
[MessageHeader(MustUnderstand = true)]
public string Department;
}
D.    public class CustomerDetailsVersion2 : CustomerDetailsVersion1
{
[MessageHeader(MustUnderstand = true)]
public string Department;
}

Answer: A

QUESTION 115
You create a Windows Communication Foundation (WCF) service. It is deployed on Microsoft Internet Information Services (IIS) with an application pool running as Network Service. You enable WMI tracing before launching the service. Your IT support staff adds WMI data collection through ASP.NET WMI tracing. You need to restrict the collection of WMI data to a privileged account. What should you do in WMI Control in the Computer Management console?

A.    – Select the Root\ServiceModel namespace.
– Remove Enable account permission for the Network Service account.
– Add a custom user and grant that user Enable account permission.
B.    – Select the Root\aspnet namespace.
– Remove Enable account permission for the Network Service account.
– Add a custom user and grant that user Enable account permission.
C.    – Select the Root\aspnet namespace.
– Remove Enable account permission for the Local System account.
– Add a custom user and grant that user Enable account permission.
D.    – Select the Root\Security namespace.
– Remove Enable account permission for the Local System account.

Answer: A
Explanation:
http://msdn.microsoft.com/en-us/library/ms735120.aspx

QUESTION 116
You are creating a Windows Communication Foundation (WCF) service. You have the following requirements:
– Messages must be sent over TCP
– The service must support transactions
– Messages must be encoded using a binary encoding
– Messages must be secured using Windows stream-based security
You need to implement a custom binding for the service. In which order should the binding stack be configured?

A.    tcpTransport, windowsStreamSecurity, transactionFlow, binaryMessageEncoding
B.    transactionFlow, binaryMessageEncoding, windowsStreamSecurity, tcpTransport
C.    windowsStreamSecurity,  tcpTransport, binaryMessageEncoding, transactionFlow
D.    binaryMessageEncoding, transactionFlow, tcpTransport, windowsStreamSecurity

Answer: B

QUESTION 117
You are developing a data contract for a Windows Communication Foundation (WCF) service. The data in the data contract must participate in round trips. Strict schema validity is not required. You need to ensure that the contract is forward-compatible and allows new data members to be added to it. Which interface should you implement in the data contract class?

A.    ICommunicationObject
B.    IExtension<T>
C.    IExtensibleObject<T>
D.    IExtensibleDataObject

Answer: D

QUESTION 118
A Windows Communication Foundation (WCF) service implements the following contract.
[ServiceContract| public interface IHelloService { [OperationContract]
[VVebGet(UriTemplate = “hello?namee{name}”)] string SayHello(string name);
}
The implementation is as follows.
public class HelloService: IHelloService { public string SayHello(string name)
{ return “Hello “.+ name;
}
}
The senvice is self-hosted, and the hosting code is as follows.
WebServiceHost svcHost = CreateHoseO;
svcHost.OpenO;
Console. ReadLineO;
SrvHost.CloseO;
You need to implement CreateHost so that the senvice has a single endpoint hosted at http://localhost:8000/HelloService
Which code segment should you use?

A.    WebServiceHost svcHost new WebServiceHost(typeof(HelloService));
svcHost.AddServiceEndpoint(typeof(lHelloService), new WebHttpBinding(WebHttpSecurityMode None), “http://localhost:8000/HelloService”);
return svcHost;
B.    Ur baseAddress = new Urit’http:I/localhost:800O1″);
r WebServiceHost svc Host new WebServiceHost(typeof(HelloService), baseAddress);
svcHostAddServiceEndpoint(typeof(lHelloService), new WebHttpBinding(WebHttpSecurityMode. None), “HelloService”); return svc Host;
C.    WebServiceHost svcHost = new Web Service Host(new HelloServiceO);
svcHost AddServiceEndpoint(typeof(lHelloService), new WebHttpBinding(WebHttpSecurityMode. None), “http://Iocalhost: 8000/HelloService”);
return svcHost;
D.    Ur baseAddress new Uri(‘http //Iocalhost 8000/”);
WebServiceHost svc Host = new WebServiceHost(new HelloService0, baseAddress), svc Host.AddServiceEndpoint(typeof(IHelloService), new WebHttpBinding(WebHttpSec urityMode None), “HelloService”);
retumn svc Host;

Answer: A

QUESTION 119
You have a Windows Communication Foundation (WCF) service that accepts the following message contract. You need to ensure that the client sends a SOAP body that is accepted by the service.

A.    <Ticket xmlns=”http://www.movies.com”>
<NumberOfSeats
xmlns=”http://www.movietheater.com”>
0
</NumberOfSeats>
<ReservationName xmlns=”http://www.movietheater.com” />
<ShowTime
xmlns=”http://www.movietheater.com”>
2010-07-05T00:SI:10.0999304-05:00
</ShowTime>
</Ticket>
B.    <Ticket xmlns=”http://www.movietheater.com”>
<ShowTime xmlns=”http://www.movietheater.com”>
2010-07-05T00:51:10.0999304-05:00
</ShowTime>
<ReservationName xmlns=”http://www.movietheater.com” />
<NumberOfSeats xmlns=”http://www.movietheater.com”>
0
</NumberOfSeats>
</Ticket>
C.    <Ticket xmlns=”http://wwv.movies.com”>
<ShowTime xmlns=”http://www.movietheater.com”>
2010-07-05TOO:51:10.0999304-05:00</ShowTime>
<NumberOfSeats xmlns=”http://www.movietheater.com”>
0
</NumbecOfSeats>
<ReservationName xmlns=”http://www.movietheater.com” />
</Ticket>
D.    <Ticket xmlns=”http://www.movietheater.com”>
<ShowTime xmlns=”http://www.movietheater.com”>
2010-07-05TOO:51:10.0999304-05:00
</ShowTime>
<NumberOfSeats xmlns=”http://wwv.movietheater.com”>
0
</NumberOfSeats>
<ReservationName xmlns=”http://www.movietheater.com” />
</Ticket>

Answer: C

QUESTION 120
You are developing a custom service host for a Windows Communication Foundation (WCF) service. The service host is named MovieServiceHost. You need to deploy the service with the custom service host in Microsoft Internet Information Services (IIS) 7.0. What should you do?

A.    Create a factory for the custom service host. Name the factory MovieServiceHostFactory.
In the web.config file, add the following attribute to the <add> element within the <serviceActivations> element, factory=”HovieServiceHostFactory”
B.    Decorate the custom service host class with the following line.
<System.ServiceModel.Activation.ServiceActivationBuildProvider()>
C.    Make sure that the service class has a default constructor.
Add a public read-only property with the name ServiceHost that returns an instance of the MovieServiceHost class.
D.    Create a factory for the custom service host. Name the factory MovieServiceHostFactory.
In the .svc file, add the following line.
<%3 ServiceHost Service=”MovieServiceHostFactory” Language=”VB”%>

Answer: A


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