Home » [Free] Get all latest Microsoft 70-513 Actual Tests 131-140

[Free] Get all latest Microsoft 70-513 Actual Tests 131-140

Ensurepass

QUESTION 131

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”);

 

Correct Answer: D

 

 

 

 

 

 

 

QUESTION 132

You create a Windows Communication Foundation (WCF) service and deploy it with wsHttpBinding and message security enabled. You create an intermediate WCF service for logging messages sent to the primary service. The intermediate service is called via the clientVia endpoint behavior. The primary service is receiving malformed data from a client application. You need to enable inspection of the malformed data and prevent message tampering. What should you do?

 

A.

Specify a protection level of None in the service contract for the intermediate service. Disable message and transport security from the client application configuration file.

B.

Specify a protection level of Sign in the service contract for the intermediate service. Disable transport security from the client application configuration file.

C.

Modify the binding on the intermediate service to use netNamedPipeBinding.

D.

Modify the binding on the intermediate service to use webHttpBinding.

 

Correct Answer: B

 

 

QUESTION 133

You are developing a client application that consumes a Windows Communication Foundation (WCF) service. The operation contract is as follows.

 

<OperationContract()>

 

<FaultContract(GetType(SalesFault))>

 

Function GetSales(ByVal saieId As String) As String

 

The service configuration file contains the following line in the serviceBehaviors section.

 

<behovior>

 

oerviceDebug includeExceptionDetoilInFaults-“True’V>

 

</behavior>

 

A divide-by-zero exception is not being handled by the service.

 

You need to ensure that the exception is caught in the client application.

 

Which type of exception should the client catch?

 

A.

TimeoutException

B.

FaultException

C.

FaultException(Of SalesFault)

D.

DivideByZeroException

 

Correct Answer: B

 

 

 

 

 

 

 

QUESTION 134

Windows Communication Foundation (WCF) service will be hosted in Microsoft Intemnet Information Services (uS). You create a new application in uS to host this service and copy the service DLL to the bin directory of the application. You need to complete the deployment of this service to uS. What should you do next?

 

A.

Create an asmx file and add a @ServiceHost directive to this file.

Copy the file to the root of the application directory.

B.

Create an .asmx file and add a @Register directive to this file.

Copy the file to the bin directory of the application.

C.

Create a svc file and add a @ServiceHost directive to this file.

Copy the file to the root of the application directory.

D.

Create a .svc file and add a @Register directive to this file.

Copy the file to the bin directory of the application.

 

Correct Answer: C

 

 

QUESTION 135

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

 

Correct Answer: D

 

QUESTION 136

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

 

The service contract is defined as follows. (Line numbers are included for reference only.)

 

clip_image001

 

You need to ensure that the service is invoked within a transaction.

 

What should you do?

 

A.

Replace line 01 with the following code.

<ServiceContract(

SessionMode:=SessionMode.NotAllowed)>

B.

Replace line 01 with the following code.

<ServiceContract(

SessionMode:=SessionMode.Required)>

C.

Insert the following code at line 09.

<ServiceBehavior(

TransactionAutoCompleteOnSessionClose:=False)>

D.

Insert the following code at line 09.

<ServiceBehavior(

ReleaseServiceInstanceOnTransactionComplete:=False)>

 

Correct Answer: B

 

 

QUESTION 137

You have a Windows Communication Foundation (WCF) service that uses a multicast protocol as a custom transport. The service implements the channel framework. You need to choose a message exchange pattern for the transport. What should you use?

 

A.

Request-Response by using the IRequestChannel interface for clients and the IReplyChannel interface for the service.

B.

Half-Duplex by using the IRequestChannel interface for clients and the IReplyChannel interface for the service.

C.

Duplex by using the IDuplexChannel interface for both clients and the service.

D.

Datagram by using the IOutputChannel interface for clients and the IInputChannel interface for the service.

 

Correct Answer: D

 

 

QUESTION 138

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. IContosoService “

 

name=” netTcp ” / >

 

<endpoint address=” net.pipe://localhost/ContosoService “

 

binding=” netNamedPipeBinding “

 

contract=” Contoso. IContosoService “

 

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.

ChannelFactory < Contoso. IContosoService > factory =

new ChannelFactory < Contoso. IContosoService >(” Contoso. IContosoService “);

B.

ChannelFactory < Contoso. IContosoService > factory =

new ChannelFactory < Contoso. IContosoService >(” netNamedPipeBinding “);

C.

ChannelFactory < Contoso. IContosoService > factory =

new ChannelFactory < Contoso. IContosoService >(” netPipe “);

D.

ChannelFactory < Contoso. IContosoService > factory =

new ChannelFactory < Contoso. IContosoService >( ” net.pipe://localhost/ContosoService “);

 

Correct Answer: C

 

 

QUESTION 139

Self-hosted Windows Communication Foundation (WCF) service uses a secure HTTP binding with a custom principal permission mode. The binding requires users to provide their Windows logon credentials. You need to retrieve the identity of the caller. What are two possible properties you can use to achieve this goal? (Each correct answer presents a complete solution Choose two)

 

A.

Thread.CurrentPrincipal.identityName

B.

HttpContext.Current.User.Identity.Name

C.

ServiceSecurityContext.Current.Primary.identity.Name

D.

OperationContext.Current.ServiceSecurityContext.PrimaryidentityName

 

Correct Answer: CD

 

 

QUESTION 140

You are debugging a Windows Communication Foundation (WCF) service. The service uses signed and encrypted messages. You need to configure logging so that you can read the contents of the messages. What should you do?

 

A.

Set maxSizeMessagesToLog to 10

B.

Set logMessageAtServiceLevel to true.

C.

Set maxMessagesToLog to 10.

D.

Set logMessageAtTransportLevel to true.

 

Correct Answer: B

 

Instant Access to Download Testing Software & PDF File for Microsoft 70-513 Real Exam

Instant Access to Try Microsoft 70-513 Free Demo

HOT EXAM!

Name of author

Name: admin