Apr 2016 updated: Pass4sure Microsoft 70-513 brain dumps 151-165

Practical of 70-513 simulations materials and preparation exams 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:

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

01 <ServiceContract()> 02 Public Interface IDataCache 03 

04 . . . 05 End Interface 06 07 08 Public Class DataCache 09 Implements IDataCache 10 

11 . . . 12 End Class 

You need to ensure that all users share the cache. 

Which code segment should you insert at line 07? 

A. <ServiceBehavior (InstanceContextMode : = InstanceContextMode.PerSession)> 

B. <ServiceBehavior(TransactionIsolationLevel:= IsolationLevel.RepeatableRead)> 

C. <ServiceBehavior(TransactionIsolationLevel:= IsolationLevel.ReadCommitted)> 

D. <ServiceBehavior(InstanceContextMode:= InstanceContextMode.Single)> 

Answer: D 


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


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


Q154. You are modifying a Windows Communication Foundation (WCF) service that provides access to report generation system. The following code segment is part of your service contract. (Line numbers are included for reference only.) 


Client applications are blocked while the service processes reports. You need to ensure that the service methods are asynchronous. 

What should you do? 

A. Insert the following code at line 04. 

[OperationContract] 

Insert the following code at line 07. 

[OperationConcracc(AsyncPactern = true)] 

B. Insert the following code at line 04. 

[OperationConcracc(AayncPaccern = true)] 

C. Insert the following code at line 04. 

[OperotionConcroct(AsyncPactern = false) 

Insert the following code at line 07. 

[OperacionConcracc(AsyncPactern = true)] 

D. Insert the following code at line 04. 

[OperationContract (AsyncPattern = false)] 

Answer: B 


Q155. You are creating a Windows Communication Foundation (WCF) service that accepts messages from clients when they are started. The message is 

defined as follows. <MessageContract()> Public Class Agent Public Property CodeName As String Public Property SecretHandshake As String End Class You have the following requirements: 

The CodeName property must be sent in clear text. The service must be able to verify that the property value was not changed after being sent by the client. 

The SecretHandshake property must not be sent in clear text and must be readable by the service. 

What should you do? 

A. Add a MessageBodyMember attribute to the CodeName property and set the ProtectionLevel to Sign. Add a MessageBodyMember attribute to the SecretHandshake property and set the ProtectionLevel to EncryptAndSign. 

B. Add a DataProtectionPermission attribute to the each property and set the ProtectData property to True. 

C. Add an XmlText attribute to the CodeName property and set the DataType property to Signed. Add a PasswordPropertyText attribute to the SecretHandshake property and set its value to True. 

D. Add an ImmutableObject attribute to the CodeName property and set its value property to True. Add a Browsable attribute to the SecretHandshake property and set its value to False. 

Answer: B 


70-513  simulations

Refresh 70-513 exam engine:

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

[ServiceContract] 

public interface IMappingService 

[OperationContract] 

long[] GetLocationCoordinates(String cityNaroe); 

[OperationContract] 

long[] GetLocationOfCitizen(String ssn) ; 

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 IldentityParameter 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 


Q157. You are developing a Windows Communication Foundation (WCF) service. You enable logging in the configuration file. 

The opening tag is defined as follows. 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: A 


Q158. You are configuring a routing service to call a target service. The routing service has no knowledge of the target service’s data tyes other than the service contract. 

The operation contract for all of the methods of the target service specifies IsOneWay=true. 

You need to specify the endpoint information for the routing service. 

What should you do? 

A. In the target service configuration file, specify "*" for the client endpoint contract and "*" for the service endpoint contract. 

B. In the routing service configuration file, specify "*" for the client endpoint contract and System.ServiceModel.Routing.ISimplexDatagramRouter for the service endpoint contract. 

C. In the routing service configuration file, specify "*" for the client endpoint contract and "*" for the service endpoint contract. 

D. In the routing service configuration file, specify "*" for the client endpoint contract and System.ServiceModel.Routing.IRequestReplyRouter for the service endpoint contract. 

Answer: B 


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


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


certleader.com

Pinpoint 70-513 answers:

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


Q162. You are developing a Windows Communication Foundation (WCF) service. You enable message logging, trace listeners, activity propagation, and tracing on the trace sources. 

You have the following code segment in the client application. (Line numbers are included for reference only.) 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: C 


Q163. You are configuring a routing service to call a target service. The routing service has no knowledge of the target service’s data types other than the service contract. 

The operation contract for all of the methods of the target service specifies IsOneWay=true. 

You need to specify the endpoint information for the routing service. 

What should you do? 

A. In the target service configuration file, specify "*" for the client endpoint contract and "*" for the service endpoint contract. 

B. In the routing service configuration file, specify "*" for the client endpoint contract and System.ServiceModel.Routing.ISimplexDatagramRouter for the service endpoint contract. 

C. In the routing service configuration file, specify "*" for the client endpoint contract and "*" for the service endpoint contract. 

D. In the routing service configuration file, specify "*" for the client endpoint contract and System.ServiceModel.Routing.IRequestReplyRouter for the service endpoint contract. 

Answer: B 


Q164. DRAG DROP 

You configure a Windows Communication Foundation (WCF) service. The service has a class named Person that includes the following code segment: 

public class Person

{

  public string name;

  public string secret;

  public string comments;

}

The Person class has the following requirements: 

. The secret property must be encrypted and serialized in the SOAP header. . The comments property must be transmitted in plain text and serialized in the SOAP body. . The name property must be transmitted in plain text and serialized in the SOAP body. . The service must ensure the integrity of the name property when data is transmitted. . The service must not ensure the integrity of the comments property when data is transmitted. 

You need to ensure that the Person class is serialized. 

How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.) 


Answer: 


Q165. A service implements the following contract. (Line numbers are included for reference only.) 


ContosoService uses NetMsmqBinding to listen for messages. The queue was set up to use transactions for adding and removing messages. 

You need to ensure that OperationOne and OperationTwo execute under the same transaction context when they are invoked in the same session. 

What should you do? 

A. Insert the following attribute to OperationOne on IContosoService. 

<TransactionFlow(TransactionFlowOption.Mandatory)> 

Insert the following attribute to OperationTwo on IContosoService. 

<TransactionFlow(TransactionFlowOption.Mandatory)> 

B. Insert the following attribute to OperationOne on ContosoService. 

<OperationBehavior( 

TransactionScopeRequired:=True, 

TransactionAutoComplete:=False)> 

Insert the following attribute to OperationTwo on ContosoService. 

<OperationBehavior 

(TransactionScopeRequired:=True, 

TransactionAutoComplete:=True)> 

C. Add the following XML segment to the application config file in the 

system.serviceModel/bindings configuration section. 

<netMsmqBinding> 

<binding name="contosoTx" durable="true" receiveContextEnabled="true" /> 

</netMsmqBinding> 

Then use the NetMsmqBinding named contosoTx to listen for messages from the clients. 

D. Add the following XML segment to the application config file in the 

system.serviceModel/bindings configuration section. 

<customBinding> 

<binding name="contosoTx"> 

<transactionFlow /> 

<binaryMessageEncoding /> 

<msmqTransport durable="true" /> 

</binding> 

</customBinding> 

Then use the CustomBinding named contosoTx to listen for messages from the clients. 

Answer: B 



see more 70-513 dumps