Renew 70-513: Pass4sure real dumps from 91 to 105

★ 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


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 Mar 70-513 Study Guide Questions:

Q91. You are developing a Windows Communication Foundation (WCF) service. You write a method named Submit that accepts messages of the type System.ServiceModel.Channels.Message. 

You need to process the body of the incoming messages multiple times in the method. 

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

A. Use the GetBody method of the Message class to read the content of the messages. 

B. Use the CreateBufferedCopy method of the Message class to load the messages into memory. 

C. Use the WriteBodyContents method of the BodyWriter class to make a copy of the messages. 

D. Use the CreateMessage method of the MessageBuffer class to make a copy of the messages. 

Answer: BD 


Q92. You are maintaining a Windows Communication Foundation (WCF) service that uses a custom UserNamePassword class to authenticate clients. The service certificate is hosted in the deployment server store for trusted root certificate authorities and has a Subject value of TaxServiceKey. Other service certificates hosted on the server also use TaxServiceKey as a Subject value. 

You need to ensure that the service identifies itself with a certificate whose subject name and distinguished names are TaxServiceKey. 

Which code segment should you use? 

A. HostInstance.Credentials.ServiceCertificate.SetCertificate( StoreLocation.LocalMachine, StoreName.My, X509FindType.FindBySubjectName, "CN=TaxServiceKey"); 

B. HostInstance.Credentials.ServiceCertificate.SetCertificate( StoreLocation.LocalMachine, StoreName.AuthRoot, X509FindType.FindBySubjectName, "CN=TaxServiceKey"); 

C. HostInstance.Credentials.ServiceCertificate.SetCertificate( StoreLocation.LocalMachine, StoreName.My, X509FindType.FindBySubjectDistinguishedName, "CN=TaxServiceKey"); 

D. HostInstance.Credentials.ServiceCertificate.SetCertificate( StoreLocation.LocalMachine, StoreName.Root, X509FindType.FindBySubjectDistinguishedName, "CN=TaxServiceKey"); 

Answer: D 


Q93. A Windows Communication Foundation (WCF) service handles online order processing for your company. 

You discover that many requests are being made with invalid account numbers. 

You create a class named AccountNumberValidator that has a method named Validate. 

Before the message is processed, you need to validate account numbers with AccountNumberValidator and reject messages with invalid account numbers. 

You create a new class that implements the IParameterInspector interface. 

Which code segment should you use in this class? 

A. public void AfterCall(string operationName, object[] outputs, 

object returnValue, 

object correlationState) 

string accountNumber = GetAccountNumber(outputs); 

var validator = new AccountNumberValidator(); 

if(!validator.Validate(accountNumber)) 

throw new FaultException(); 

public object BeforeCall(string operationName, object[] inputs) 

return null; 

B. public void AfterCall(string operationName, 

object[] outputs, 

object returnValue, 

object correlationState) 

return; 

public object BeforeCall(string operationName, 

object[] inputs) 

string accountNumber = GetAccountNumber(inputs); 

var validator = new AccountNumberValidator(); 

if (!validator.Validate(accountNumber)) 

throw new FaultException(); 

return null;} 

C. public void AfterCall(string operationName, 

object[] outputs, 

object returnValue, 

object correlationState) 

string accountNumber = GetAccountNumber(outputs); 

var validator = new AccountNumberValidator(); 

if(!validator.Validate(accountNumber) 

returnValue = new FaultException(); 

public object BeforeCall(string operationName, 

object[] inputs) 

{ return null; } 

D. public void AfterCall(string operationName, 

object[] outputs, 

object returnValue, 

object correlationState) 

return; 

public 

object BeforeCall(string operationName, object[] inputs) { 

string accountNumber = GetAccountNumber(inputs); 

var validator = new AccountNumberValidator(); 

if (!validator.Validate(accountNumber)) 

return new FaultException(); 

Answer: B 


Q94. A Windows Communication Foundation (WC9 service implements a contract with one-way and requestreply operations. 

The service is exposed over a TCP transport Clients use a router to communicate with the service. The router is impemented as follows. 

(Line numbers are included for reference only.) 

01 Dim host As ServiceHost = 

02 New ServiceHost(GetType(RoutingService)) 

03 hostAddServiceEndpoint( 

04 GetType(lSimplexDatagramRouter), 

05 New NetTcpBinding0, “net.tcp://localhostlRouter” 

06) 

07 Dim lep As List(Of ServiceEndpoint) = 

08 New List(Of SenviceEndpointx) 

09 lepAdd( 

10 New ServiceEndpoint( 

11 CortractDescription.GetContract( 

12 GetType(lSimplexDatagramRouter) 

13)1 

14 New NetTcpBinding0,x 

15 New EndpointAddressf’nettcp://localhost:8080/Logger’) 

16) 

17) 

18 Dim rc As RoutingConfiguration = New RoutingConfiguration() 

19 rc . FitterTable.Add(New Matctf4llMessageFilter0, lep) 

20 host. Description. Behaviors.Add(New RoutingBehavior(rc)) Request-reply operations are failing. 

You need to ensure that the router can handle one-way and request-reply operations. 

What should you do? 

A. Change line 04 as follows. 

Get Type(lRequestReplyRouter), 

B. Change line 04 as follows 

Get Type(lDuplexSessionRouter), 

C. Change line 12 as follows 

GetType(lRequestReplyRouter) 

D. Change line 12 as follows. 

Get Type(IDuplexSessionRouter) 

Answer: B 


Q95. You develop a Windows Communication Foundation (WCF) service that contains the following code segment. (Line numbers are included for reference only.) 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: D 


70-513 latest exam

Regenerate 70-513 torrent:

Q96. You develop a Windows Communication Foundation (WCF) service. 

You name the service MovieService in the Movie namespace. The service is hosted in Microsoft Internet Information Services (IIS). You copy the assembly containing the service to the bin folder in the virtual directory path. 

You need to set up the URI that is mapped to the service. 

What should you do? 

A. Add a Movie.svc file in the root of the virtual path with the following line. <*8ServiceHost 

language""VB" Service "MovieService. svc "*> 

B. Add the following code segment to the web.config file. 

<3erviceHostingEnvironment> 

<serviceActivations> 

<add relativeAddress="./Movie.svc" 

service="Movie.MovieService"/> 

</serviceActivacions> 

</serviceHostingEnvironment> 

C. Add a Movie.svc file in the root of the virtual path with the following line. 

<%@ServiceHosc language="VB" Service="MovieService"%> 

D. Add the following code segment to the web.config file. 

<serviceHostingEnvironment> 

<serviceActivacions> 

<add reiativeAddress="./Movie" 

service="Movie.MovieService"/> 

</serviceActivations> 

</serviceHostingEnvironmenc> 

Answer: B 


Q97. You are developing a Windows Communication Foundation (WCF) service. The service configuration file has a <System.Diagnostics> element defined. 

You need to ensure that all security audit information, trace logging, and message logging failures are recorded. 

Which configuration segment should you add to the <System.Diagnostics> element? 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: C 


Q98. You are developing a Windows Communication Foundation (WCF) service that reads messages from a public non-transactional MSMQ queue. 

You need to configure the service to read messages from the failed-delivery queue. 

Which URI should you specify in the endpoint configuration settings of the service? 

A. net.msmq://localhost/msmq$;FailedMessages 

B. net.msmq://localhost/msmq$;DeadLetter 

C. net.msmq://localhost/system$;DeadXact 

D. net.msmq://localhost/system$;DeadLetter 

Answer: D 


Q99. A Windows Communication Foundation (WCF) service uses the following service contract. 

[ServiceContract] 

public interface IService 

[OperationContract] 

string Operation 1 (string s); 

You need to ensure that the operation contract Operationi responds to HTTP POST requests. 

Which code segment should you use? 

A. [OperationContract| [Weblnvoke(Method POST)] string Operationl(string s); 

B. [OperationContract| [WebGet(UriTemplate = POST’)] string Operation 1 (string s); 

C. [OperationContract(ReplyAction z ‘POST’)J string Operationi (string s); 

D. [OperationContract(Action WPOST)1 string Operationl(string s); 

Answer: A 


Q100. 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.) 

01 <ServiceContract()> 

02 Public Interface IDatallpdate 

03 

04 <OperationContract()> 

05 <TransactionFlow(TransactionFlowOption.Handatocy)> 

06 Sub Update (ByVal accountNumber As String, 

ByVal amount As Double) 

07 

08 End Interface 

09 

10 Class UpdateService 

11 Implements IDataUpdate 

12 

13 <OperationBehavior( 

TransactionScopeRequired:=True, TransactionAutoComplete:=True)> 

14 Public Sub Update(ByVal accountNumber As String, 

ByVal amount As Double) 

Implements IDataUpdate.Update IS 

16 Try 

17 18 Catch ex As Exception 

19 WriteErrorLog(ex) 20 

21 End Try 

22 

23 End Sub 

24 

25 End Class 

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 20. Throw 

B. Replace line 13 with the following line. <OperationBehavior( TransactionScopeRequired:MTrue, TransactionAutoComplece:"False)> 

C. Insert the following line at line 09. <ServiceBehavlor( TransactionAutoCoropleteOnSessionClose:"False) > 

D. Insert the following line at line 09. <ServiceBehavior( TransacCionAucoCompleteOnSesslonClose:"True) > 

Answer: A 


70-513 exam engine

Real 70-513 study guide:

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


Q102. You are creating a windows Communication Foundation (WCF) service to process orders. 

The data contract for the order is defined as follows: 

[DataContract] 

public class Order 

… 

[DataMemberl 

public string CardHolderName { get; set; 

[DataMember] 

public string CreditCardNumber { get; set; } 

You have the following requirements 

. Enable the transmission of the contents of Order from the clients to the service. 

. Ensure that the contents of CreditCardNumber are not sent across the network in clear text. 

. Ensure that the contents of CreditCardNumber are accessible by the service to process the order. 

You need to implement the service to meet these requirements. 

What should you do? 

A. Add a DataProtectionPermission attribute to the CreditCardNumber property and set the ProtectData property to true. 

B. Convert the DataContract to a MessageContract and set the ProtectionLevel property to SignAndEncrypt 

C. Change the data type of CreditCardNumber from string to SecureString 

D. Implement the CreditCardNumber property getter and setter. In the setter, run the value of the CreditCardNumber through the MD5CryptoServiceProvider class TransformBlock method 

Answer: B 


Q103. You develop a Windows Communication Foundation (WCF) SOAP service that contains a class named Order. The Order class includes a field named secret that stores private data. 


The service has the following requirements: 

. The secret field must be encrypted. 

. All other fields in the Order class must serialize as plain text. 

You need to configure serialization for the Order class. 

What should you do? 

A. Add a MessageBodyMember attribute to the secret field and set the ProtectionLevel to Sign. 

Add a MessageBodyMember attribute to each of the other fields of the class. 

B. Add a MessageHeader attribute to the secret field and set the ProtectionLevel to Sign. 

Add a MessageBodyMember attribute to each of the other fields of the class. 

C. Add a MessageHeader attribute to the secret field and set the ProtectionLevel to EncryptAndSign. 

Add a MessageBodyMember attribute to each of the other fields of the class. 

D. Add a MessageBodyMember attribute to the secret field and set the ProtectionLevel to EncryptAndSign. 

Add a MessageBodyMember attribute to each of the other fields of the class. 

Answer: A 


Q104. 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(Of T) 

C. IExtensibleObject(Of T) 

D. IExtensibleDataObject 

Answer: D 


Q105. 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 public 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