Top 15 testing engine 70-513 for examinee (181 to 195)

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 70-513 Exam Dumps (PDF & VCE):
Available on: https://www.certleader.com/70-513-dumps.html


70-513 Product Description:
Exam Number/Code: 70-513 vce
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

Instant Access to Free VCE Files: Microsoft 70-513 TS: Windows Communication Foundation Development with Microsoft .NET Framework 4

70-513 examcollection

High quality of 70-513 dumps materials and class for Microsoft certification for consumer, Real Success Guaranteed with Updated 70-513 pdf dumps vce Materials. 100% PASS TS: Windows Communication Foundation Development with Microsoft .NET Framework 4 exam Today!

2016 Apr 70-513 Study Guide Questions:

Q181. You are developing an application to update a users social status. You need to consume the service using Windows Communication Foundation (WCF). 

The client configuration is as follows. 

<system.serviceModel> 

<bindings> 

<webHttpBinding> 

<binding name="SocialConfig"> 

<security mode="TransportCredentialOnly"> 

<transport clientCredentialType="Basic" 

realm="Social API" /> 

</security> 

</binding> 

</webHttpBinding> 

</bindings> 

<client> 

<endpoint address= " http:// contoso .com " 

binding="webHttpBinding" 

bindingConfiguration="SocialConfig" 

ontract="ISocialStatus" 

name="SocialClient" /> 

</client> 

</system.serviceModel> 

The service contract is defined as follows. 

<ServiceContract()> 

Public Interface ISocialStatus 

<OperationContract()> 

<WebInvoke(UriTemplate:="/statuses/update.xml?status={text}")> 

Sub UpdateStatus(ByVal text As String) 

End Interface 

Which code segment should you use to update the social status? 

A. Using factory As WebChannelFactory(Of ISocialStatus) = 

New WebChannelFactory(Of ISocialStatus)("SocialClient") 

factory.Credentials.UserName.UserName = user.Name 

factory.Credentials.UserName.Password = user.Password 

Dim socialChannel As ISocialStatus = 

factory.CreateChannel() 

socialChannel.UpdateStatus(newStatus) 

End Using 

B. Using factory As ChannelFactory(Of ISocialStatus) = 

New WebChannelFactory(Of ISocialStatus)(GetType(ISocialStatus)) 

factory.Credentials.UserName.UserName = user.Name 

factory.Credentials.UserName.Password = user.Password 

Dim socialChannel As ISocialStatus = 

factory.CreateChannel() socialChannel.UpdateStatus(newStatus) End Using 

C. Using factory As ChannelFactory(Of ISocialStatus) = 

New ChannelFactory(Of ISocialStatus)("POST") 

factory.Credentials.Windows.ClientCredential.UserName = 

user.Name 

factory.Credentials.Windows.ClientCredential.SecurePassword.SetAt( 

0, user.Password) 

Dim socialChannel As ISocialStatus = factory.CreateChannel() 

socialChannel.UpdateStatus(newStatus) 

End Using 

D. Using factory As WebChannelFactory(Of ISocialStatus) = 

New WebChannelFactory(Of ISocialStatus)(GetType(ISocialClient)) 

factory.Credentials.Windows.ClientCredential.UserName = 

user.Name 

factory.Credentials.Windows.ClientCredential.SecurePassword.SetAt( 

0, user.Password) 

Dim socialChannel As ISocialStatus = factory.CreateChannel() 

socialChannel.UpdateStatus(newStatus) 

End Using 

Answer: A 


Q182. 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 bindingConfiguration attribute in the endpoint element of the configuration file to wsHttpBinding. 

Answer: A 


Q183. You are developing a Windows Communication Foundation (WCF) service that is hosted by a Windows Forms application. 

The ServiceHost instance is created in the Form constructor. 

You need to ensure that the service is not blocked while the UI thread is busy. 

What should you do? 

A. Decorate the service implementation class with the following line of code. 

<ServiceBehavior( 

UseSynchronizationContext:=False)> 

B. Decorate the service implementation class with the following line of code. 

<ServiceBehavior( 

ConcurrencyMode:=ConcurrencyMode.Multiple)> 

C. Call the Invoke method of the form and supply a delegate. 

D. Call the BeginInvoke method of the form and supply a delegate. 

Answer: A 


Q184. 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: 


Q185. You develop a Windows Communication Foundation (WCF) service that interacts with Microsoft Message Queuing (MSMQ). 

The service requires sessions. You need to create a custom binding that enables messages sent to the queue to be viewed when you are using a listener tool. 

Which binding elements should you use? 

A. textMessageEncoding and msmqTransport in this order 

B. textMessageEncoding and msmqIntegrationTransport in this order 

C. msmqTransport and textMessageEncoding in this order 

D. msmqIntegrationTransport and textMessageEncoding in this order 

Answer: A 


70-513 free question

Updated 70-513 exam cost:

Q186. 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()> 

Function GetCustomerInformation( 

ByVal header As Header, 

ByVal customerNumber As Integer) 

As CustomerInformation 

End Interface 

<DataContract()> 

Public Class CustomerInformation 

End Class 

<MessageContract()> 

Public Class Header 

<MessageHeader()> 

Public SecurityTag As String 

End Class 

B. <ServiceContract()> 

Public Interface IService 

<OperationContract()> 

Function GetCustomerInformation( 

ByVal header As Header, ByVal customerNumber As Integer) As CustomerInformation End Interface <MessageContract()> Public Class CustomerInformation End Class <MessageContract()> Public Class Header <MessageHeader()> Public SecurityTag As String End Class 

C. <ServiceContract()> Public Interface IService <OperationContract()> Function GetCustomerInformation( ByVal request As CustomerNumber) As CustomerInformation End Interface <DataContract()> Public Class CustomerInformation End Class <MessageContract()> Public Class CustomerNumber <MessageHeader()> Public SecurityTag As String <MessageBodyMember()> Public CustomerNumberElement As Integer End Class 

D. <ServiceContract()> Public Interface IService <OperationContract()> Function GetCustomerInformation( ByVal request As CustomerNumber) As CustomerInformation End Interface <MessageContract()> Public Class CustomerInformation End Class <MessageContract()> Public Class CustomerNumber <MessageHeader()> Public SecurityTag As String <MessageBodyMember()> Public CustomerNumberElement As Integer End Class 

Answer: D 


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


Q188. You are developing a Windows Communication Foundation (WCF) service that allows customers to update financial data. 

The client applications call the service in a transaction. The service contract is defined as follows. (Line numbers are included for reference only.) 


Customers report that the transaction completes successfully even if the Update method throws an exception. 

You need to ensure that the transaction is aborted if the Update method is not successful. 

What should you do? 

A. insert the following line at line 22. throw; 

B. Insert the following line at line 09. [ServiceBehavior( TransactionAutoCompleteOnSessionClose = false)] 

C. Replace line 12 with the following line. [OperationBehavior( TransactionScopeRequired = true, TransactionAutoCoroplete - false)] 

D. Insert the following line at line 09. [ServiceBehavior( TransactionAutoCompleteOnSessionClose = true)] 

Answer: A 


Q189. A Windows Communication Foundation (WCF) service is self-hosted in a console application. 

The service implements the ITimeService service interface in the TimeService class. 

You need to configure the service endpoint for HTTP communication. 

How should you define the service and endpoint tags? 

A. Define the service tag as follows. 

<service name="ITimeService"> 

Define the endpoint tag as follows. 

< endpoint kind ="TimeService" 

address="http://localhost:8080/TimeService" 

binding="wsHttpBinding" 

contract="ITimeService"/> 

B. Define the service tag as follows. 

<service name="TimeService"> 

Define the endpoint tag as follows. 

< endpoint kind="TimeService" 

address="http://localhost:8080/TimeService" 

binding="wsHttpBinding" 

contract="ITimeService"/> 

C. Define the service tag as follows. 

<service name="ITimeService"> 

Define the endpoint tag as follows. 

< endpoint name="TimeService" 

ddress="http://localhost:8080/TimeService" 

binding="wsHttpBinding" 

contract="ITimeService"/> 

D. Define the service tag as follows. 

<service name="TimeService"> 

Define the endpoint tag as follows. 

<endpoint address="http://localhost:8080/TimeService" 

binding="wsHttpBinding" 

contract="ITimeService"/> 

Answer: D 


Q190. You are creating a Windows Communication Foundation (WCF) service that uses claims-based authorization. The following code retrieves the correct claim set. 

var claims = ServiceSecurityContext.Current. 

AuthorizationContext.ClaimSets[0]; 

You need to validate that the requesting client application has included a valid DNS value in the claim. 

Which code segment should you use to retrieve the claim for validation? 

A. claims.FindClaims(ClaimTypes.Dns, Rights.PossessProperty) .FirstOrDefault(); 

B. claims.FindClaims(ClaimTypes.Dns, Rights.Identity) .FirstOrDefault(); 

C. claims.ContainsClairo(Claim.CreateDnsClaim(ClaimTypes.Dns)); 

D. claims.Equals(ClaimTypes.Dns); 

Answer: A 


70-513 exam question

Approved 70-513 secret:

Q191. A Windows Communication Foundation (WCF) client configuration file contains the following XML segment in the system.serviceModel element. 

<client> 

<endpoint address=" net.tcp://server/ContosoService " 

binding=" netTcpBinding " 

contract=" Contoso. IContoso Service " 

name=" netTcp " / > 

<endpoint address=" net.pipe://localhost/ContosoService " 

binding=" netNamedPipeBinding " 

contract=" Contoso. IContoso Service " 

name=" netPipe " /> 

</client> 

You need to create a channel factory that can send messages to the endpoint listening at net.pipe://localhost/ContosoService. 

Which code segment should you use 

A. Dim factory As ChannelFactory (Of Contoso. IContosoService ) = 

New ChannelFactory (Of Contoso. IContosoService )(" Contoso. IContosoService ") 

B. Dim factory As ChannelFactory (Of Contoso. IContosoService ) = 

New ChannelFactory (Of Contoso. IContosoService )(" netNamedPipeBinding ") 

C. Dim factory As ChannelFactory (Of Contoso. IContosoService ) = 

New ChannelFactory (Of Contoso. IContosoService )(" netPipe ") 

D. Dim factory As ChannelFactory (Of Contoso. IContosoService ) = 

New ChannelFactory (Of Contoso. IContosoService )( 

" net.pipe://localhost/ContosoService ") 

Answer: D 


Q192. You are modifying a Windows Communication Foundation (WCF) service that issues security tokens. The service is accessible through the named pipe protocol. No endpoints are added in the service code. The configuration file for the service is as follows. (Line numbers are included for reference only.) 


You need to ensure that new and existing client applications can access the service through HTTP and named pipes. 

What should you do? 

A. Insert the following line at line 05. <endpoint address=http://www.contoso.com binding="wsHttpBinding" contract="Contoso.TokenService" /> 

B. Insert the following line at line 05. 

<endpoint address=http://www.contoso.com binding="basicHttpBinding" contract="Contoso.TokenService" /> 

C. Insert the following line at line 08. <add baseAddress="http://www.contoso.com" /> 

D. Insert the following line at line 08. <add baseAddress="net.tcp://www.contoso.com:8090" /> 

Answer: C 


Q193. You implement a Windows Communication Foundation (WCF) service. 

You must process all of the valid SOAP messages that the service receives. 

What should you do? 

A. On the OperationContractAttribute, call the Match method. 

B. Call the Message.CreateMessage static method. Pass the value MessageVersion.Default as a parameter. 

C. On the OperationContractAttribute of a method, set the value of the Action and ReplyAction properties to *. 

D. On the OperationContractAttribute of a method, set the value of the Action and ReplyAction properties to ?. 

Answer: A 


Q194. You develop a Windows Communication Foundation (WCF) service that employees use to access bonus information. You define the following service contract. (Line numbers are included for reference only.) 

01 [ServiceContract(SessionMode = SessionMode.Required)] 

02 public interface IFinancialService 

03 { 

04 [OperationContract] 

05 string Login(int employeeID, string passwordHash); 

06 

07 [OperationContract] 

08 double GetBonus(int month); 

09 

10 [OperationContract(IsTerminating = true)] 

11 void Logout(); 

12 } 

Client applications can invoke methods without logging in. 

You need to ensure that the client applications invoke Login before invoking any other method. 

You also need to ensure that client applications cannot consume the service after invoking Logout. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Replace line 04 with the following code. [OperationContract(IsInitiating = false)] 

B. Replace line 04 with the following code. [OperationContract(IsInitiating = true, IsTerminating = true)] 

C. Replace line 07 with the following code. [OperationContract(IsInitiating = false)] 

D. Replace line 10 with the following code. [OperationContract(IsInitiating = false, IsTerminating = true)] 

Answer: CD 


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



see more TS: Windows Communication Foundation Development with Microsoft .NET Framework 4