70-513 pack(151 to 165) for client: May 2016 Edition

70-513 Royal Pack Testengine pdf

100% Actual & Verified — 100% PASS

Unlimited access to the world's largest Dumps library! Try it Free Today!

Get it now →

Product Description:
Exam Number/Code: 70-513
Exam name: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Free Certification Real IT 70-513 Exam pdf Collection

Exam Code: 70-513 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 70-513 Exam.

2016 May 70-513 Study Guide Questions:

Q151. A Windows Communication Foundation (WCF) solution uses the following contract to share a message across its clients. (Line numbers are included for reference only.) 


You need to ensure that all clients calling GetMessage will retrieve the updated string if the message is updated by any client calling PutMessage. 

What should you do? 

A. Add the following attribute to the TeamMessageService class, before line 10. 

[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] 

B. Add the following attribute to the TeamMessageService class, before line 10. 

[ServiceBehavior(InstanceContextMode = 

InstanceContextMode.PecSession) ] 

Than change che binding definition on the service at line 25, and on the client to the following. 

WSHttpBinding binding = new WSHttpBinding(SecurityMode.None); 

binding.ReiiabieSession.Enabled = true; 


C. Pass a service instance to the instancing code in line 24, as follows. 

ServiceHost host = new ServiceHost(new TeamMessageService()); 

D. Redefine the message string in line 13, as follows. 

static string message = "Today’ s Message"; 

Then change the implementation of PutMessage in lines 19-22 to the following. 

public void PutMessage(string message) { 

TeamMessageService.message = message; > 

Answer: A 


Q152. DRAG DROP 

You have a client application that consumes a Windows Communication Foundation (WCF) service. The service contains a class named RegistrationService. The RegistrationService class contains two methods named SubmitRegistration and GetRegistrations. 

The service has the following requirements: 

. The client application must call the SubmitRegistration method synchronously. 

. The client application must call the GetRegistrations method asynchronously. 

You need to complete the client-side code to call the WCF service. 

Which six code segments should you use in sequence? (To answer, move the appropriate six code segments from the list of code segments to the answer area and arrange them in the correct order.) 


Answer: 


Q153. Your Windows Communication Foundation (WCF) client application uses HTTP to communicate with the service. 

You need to enable message logging and include all security information such as tokens and nonces in logged messages. 

What should you do? 

A. In the application configuration file, add the logKnownPii attribute to the message 

logging diagnostics source and set the value of the attribute to true. 

Generate the ContosoService class using the Add Service Reference wizard. Add a 

reference to System.ServiceModel.Routing.dll. 

Add the following code segment. 

ContosoService client = new ContosoService(); 

SoapProcessingBehavior behavior = new SoapProcessingBehavior(); 

behavior.ProcessMessages = true; 

client.Endpoint.Behaviors.Add(behavior); 

B. In the application configuration file, add the following XML segment to the 

system.serviceModel configuration section group. 

<diagnostics> 

<messageLogging logMessagesAtTransportLevel="true" 

logEntireMessage="true" /> 

</diagnostics> 

C. In the machine configuration file, add the following XML segment to the 

system.serviceModel configuration section. 

<machineSettings enableLoggingKnownPii="true" /> 

Generate the ContosoService class using the Add Service Reference wizard. 

Add the following code segment. 

ContosoService client = new ContosoService(); 

client.Endpoint.Behaviors.Add(new CallbackDebugBehavior(true)); 

D. In the machine configuration file, add the following XML segment to the 

system.serviceModel configuration section. 

<machineSettings enableLoggingKnownPii="true" /> 

In the application configuration file, add the logKnownPii attribute to the message logging 

diagnostics source and set the value of the attribute to true. In the application configuration 

file, add the following XML segment to the system.serviceModel configuration section 

group. 

<diagnostics> 

<messageLogging logMessagesAtTransportLevel="true"/> 

</diagnostics> 

Answer: D 


Q154. 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 


Q155. A Windows Communication Foundation (WCF) service is deployed with netTcpBinding. This service uses a duplex message exchange pattern. You are developing the next version of the WCF service. 

You discover that your company's hardware load balancer performs correctly only for WCF services that use HTTP. 

You need to ensure that your service works with the load balancer. 

What should you do? 

A. Create a custom binding that has the compositeDuplex. textMessageEncoding, and wsHttpTransport binding elements in this order. 

B. Use basicHttpBinding. 

C. Create a custom binding that has the compositeDuplex, textMessageEncoding, and namedPipeTransport binding elements in this order. 

D. Use wsHttpBinding. 

Answer: A 


70-513

Leading 70-513 practice exam:

Q156. 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"/> 

07 </behavior> 

08 </serviceBehaviors> 

09 </behaviors> 

10 <serviceHostingEnvironmentmultipleSiteBindingsEnabled="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 


Q157. 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. <WebInvoke(Method:= “POST”)> 

B. <WebInvoice (ResposeFormat:=WebMessageFormat .Xml, BodyStyle :=WebMessageBodyStyle.Bare) > 

C. <WebInvoke()> 

D. <WebInvoice(ResponseFormat :=WebMessageFormat.Xml, BodyStyle:=WebMessageBodyStyle.Wrapped)> 

Answer: D 


Q158. A Windows Communication Foundation (WCF) service listens for messages at net tcpilwwwcontoso.comMMyService. 

It has a logical address at http/Iwwwcontosocorn)MyService 

The configuration for the WCF client is as follows 

<endpoint addressrhTttpllwwwcontosocom/MyService” 

bindinge”netTc pBinding” 

bindingConfiguraton-NetTc pBinding_lMyService 

contract="ServiceReference 1. IMyServce’ 

name=’NetTcpBinding_lllyService"/>v 

The generated configuration does not provide enough information for the client to communicate with the server. 

You need to update the client so that it can communicate with the server what should you do 

A. In the client configuration. Change the value of the address attribute to nettcp:/Iwwwcontosocom/MyService 

B. In the client configuration, change the value of the address attribute to net.tcp:Ilwwwcontosocom/MyServicellisten=http:/Iwwwcontosocom/MyService. 

C. After instantiating the client and before invoking any service operation, add this line of code client Endpoint BehaviorsAdd( new EndpointDiscoveryBehawior0{ Enabled true }); 

D. After instantiating the client and before invoking any service operation, add this line of code. client. Endpoint BehaviorsAdd( new Client ViaBehavior( new Uhcnet.tc pifwww.contoso. comiIMyService))) 

Answer: D 


Q159. You are modifying an existing Windows Communication Foundation (WCF) service that is defined as follows. 


SubmitOrder makes a call to another service. The ProcessMessage method does not perform as expected under a heavy load. 

You need to enable processing of multiple messages. New messages must only be processed when the ProcessMessage method is not processing requests, or when it is waiting for calls to SubmitOrder to return. 

Which attribute should you apply to the MessageProcessor class? 

A. CallbackBehavior ( ConcurrencyMode = ConcurrencyMode.Reentrant ) 

B. CallbackBehavior ( ConcurrencyMode = ConcurrencyMode.Multiple ) 

C. ServiceBehavior ( ConcurrencyMode = ConcurrencyMode.Reentrant ) 

D. ServiceBehavior ( ConcurrencyMode = ConcurrencyMode.Multiple ) 

Answer: C 


Q160. 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 correct answer presents part of the solution. Choose two.) 

A. Add the following XML segment between lines 10 and 11. 

<endpoint address= "" 

binding= " mexHttpBinding " 

contract= " IMetadataExchange " 

/> 

B. Add the following XML segment between lines 10 and 11. 

<endpoint address="" 

binding= " basic HttpBinding " 

contract= " IMetadataExchange " /> 

C. Add the following XML segment between lines15 and 16. 

< serviceDiscovery > 

< announcementEndpoints > 

<endpoint address=""/> 

</ announcementEndpoints > 

</ serviceDiscovery > 

D. Add the following XML segment between lines 15 and 16 

< serviceMetadata httpGetEnabled ="true" /> 

Answer: AD 


70-513-exam

Real 70-513 software:

Q161. A Windows Communication Foundation (WCF) client uses the following service contract. (Line numbers are included for reference only.) 

01 [ServiceContract] 02 public interface IService 03 ( 04 [OperationContractj 05 string Operation1O; 06 [OperationContract] 07 string Operation2(), 08) 

You need to ensure that all calls to Operation 1 and Operation2 from the client are encrypted and signed. 

What should you do? 

A. Set the ProtectionLevel property in line 01 to EncryptAndSign. 

B. Set the ProtectionLevel property in line 04 and line 06 to Sign. 

C. Add a SecurityCriticalAttribute ror each operation. 

D. Add a SecunitySafeCriticalAttribute for each operation. 

Answer: A 


Q162. A Windows Communication Foundation (WCF) service is self-hosted in a console application. The service implements the IDataAccess contract, which is defined in the MyApplication namespace. 

The service is implemented in a class named DataAccessService, which implements the IDataAccess interface and also is defined in the MyApplication namespace. 

The hosting code is as follows. (Line numbers are included for reference only.) 


You need to create a ServiceHost instance and assign it to the host variable. You also need to instantiate the service host. 

Which line of code should you insert at line 04? 

A. host = New ServiceHost("MyApplication.DataAccessService") 

B. host = New ServiceHost("MyApplication.IDataAccess") 

C. host = New ServiceHost(GetType(IDataAccess)) 

D. host = New ServiceHost(GetType(DataAccessService)) 

Answer: D 


Q163. 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> 

Sub PostData(Byval data As Order) You need to modify PostData so that it can receive any SOAP message. 

Which code segment should you use? 

A. <OperationContract(lsOneWay True, Action ReplyAction ‘-)> Sub PostData(ByVal data As Order) 

B. OperationContract(lsOneway: zTrue, Action:z’-’, ReplyAction: z"-’)> Sub PostData(ByVal data As BodyWriter) 

C. <OperationContract> Sub PostData(Byval data As BodyWriter) 

D. <OperationContract0> Sub PostData(ByVal data As Message) 

Answer: A 


Q164. You are developing a Windows Communication Foundation (WCF) service that returns location information for authorized law enforcement agencies. The service contract is as follows. 


Users are authenticated and impersonated. The system uses ASP.NET roles. The members of law enforcement are members of the LawEnforcement role. 

You need to ensure that only members of the LawEnforcement role can call these methods. 

What are two possible ways to achieve this goal (Each correct answer presents a complete solution? Choose two.) 

A. Add a PrincipalPermissionAttribute to each method that should be available only to members of law enforcement. Set its SecurityAction to Demand and set the role equal to LawEnforcement. 

B. Use the CurrentPrincipal property of the thread. Call the IsInRole method specifying LawEnforcement as a parameter. 

C. Create a GenericPrincipal specifying Thread.CurrentPrincipal.Identity as the IIdentityParameter and LawEnforcement as the only value for the Roles parameter. 

D. At the beginning of each method, enumerate each ClaimSet in a new WindowsClaimSet. Use the FindClaims method to locate a claim type named Role with a right named LawEnforcement. 

Answer: AB 


Q165. 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. 

Dim client As TravelServiceClient = New TravelServiceClient() 

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(AddressOf 

GetFlightCallback, Nothing) client.GetFlight() 

B. client.GetFlight() 

client.BeginGetFlight(AddressOf GetFlightCallback, Nothing) 

C. AddHandler client.GetFlightCompleted, 

New EventHandler(Of GetFlightCompletedEventArgs) 

(AddressOf GetFlightCallback) 

client.GetFlightAsync() 

D. Dim asyncResult As IAsyncResult = client.BeginGetFlight( 

AddressOf GetFlightCallback, client) 

client.EndGetFlight(asyncResult) 

Answer: D 



see more http://www.pdfcollection.net/70-513-pdf.html
http://www.exambible.com/70-513-exam/