Ensurepass

QUESTION 11

DRAG DROP

You develop a Windows Communication Foundation (WCF) service. The service implements the IRegistrationService interface in a class named RegistrationService. You need to configure the service to use file-less activation. 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.)

 

clip_image002

 

Correct Answer:

clip_image004

 

 

QUESTION 12

You develop a Windows Communication Foundation (WCF) service. It is used exclusively as an intranet application and is currently unsecured.

 

You need to ensure that the service meets the following requirements:

 

clip_image006The service now must be exposed as an Internet application.

clip_image006[1]The service must be secured at the transport level.

clip_image006[2]Impersonation and delegation cannot be enabled.

 

What should you use?

 

A.

wsHttpBinding and HTTPS

B.

basicHttpBinding and Kerberos

C.

basicHttpBinding and HTTP

D.

wsHttpBinding and Kerberos

 

Correct Answer: A

 

 

QUESTION 13

You are developing a Windows Communication Foundation (WCF) service. You need to enable security auditing for all events. What should you do?

 

A.

Set the serviceAuthorizationAuditLevel setting to Success and the messageAuthenticationAuditLevel setting to Success.

B.

Set the messageAuthenticationAuditLevel setting to Success and the auditLogLocation setting to Application.

C.

Set the serviceAuthorizationAuditLevel setting to SuccessAndFailure and the messageAuthenticationAuditLevel setting to SuccessAndFailure.

D.

Set the messageAuthenticationAuditLevel setting to SuccessAndFailure and the auditLogLocation setting to Security.

 

Correct Answer: C

 

 

QUESTION 14

You are developing a Windows Communication Foundation (WCF) service. You enable logging in the configuration file. The opening tag is defined as follows.

 

clip_image007

 

You need to ensure that logging is implemented so that only messages with SOAP headers are logged. What should you add to the filters element of the application configuration file?

 

clip_image009

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: C

 

 

QUESTION 15

You develop a Windows Communication Foundation (WCF) service. You enable all performance counters and run multiple calls to the service. The service must isolate session data for each user. You need to monitor the instancing behavior used in the service. Which performance counter should you monitor?

 

A.

ServiceModelService 4.0.0.0\Calls

B.

ServiceModelService 4.0.0.0\Instances

C.

ASP.NET State Service\State Server Sessions Active

D.

ASP.NET State Service\State Server Sessions Total

 

Correct Answer: B

 

 

QUESTION 16

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

 

clip_image011

 

The service is implemented as follows.

 

clip_image012

 

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.

 

Correct Answer: B

 

 

QUESTION 17

You are developing a Windows Service. The Windows Service will host a Windows Communication Foundation (WCF) service. The Windows Service class will inherit from ServiceBase. You need to ensure that the WCF service starts when the Windows Service is restarted. What should you do in the Windows Service class?

 

A.

Create a public method named Main.

Create a new ServiceHost in the Main method.

Override the OnShutdown method and close the ServiceHost.

B.

Override the OnStart method and create and open a new ServiceHost.

Override the OnStop method and close the ServiceHost.

C.

Override the OnPowerEvent method and open a new ServiceHost.

Override the OnShutdown method and close the ServiceHost.

D.

Override the OnContinue method and open a new ServiceHost.

Override the OnStop method and close the ServiceHost.

 

Correct Answer: B

 

 

QUESTION 18

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

 

clip_image014

 

You need to ensure that all service endpoints are available to client applications. Which code segment should you insert at line 04?

 

clip_image016

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: C

 

 

QUESTION 19

You are modifying a Windows Communication Foundation (WCF) service that allows customers to update financial data. The service currently requires a transaction from the client application and is working correctly. The service contract is defined as follows. (Line numbers are included for reference only.)

 

clip_image017

 

The service must be modified so that client applications do not need to initiate a transaction when calling the operation. The service must use the client application’s transaction if one is available. Otherwise it must use its own transaction. You need to ensure that the service operation is always executed within a transaction. What should you do?

 

clip_image018

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: D

 

 

QUESTION 20

You have a Windows Communication Foundation (WCF) service. The service has issues with performance when it receives messages on a specific endpoint. The service must collect the minimum number of performance counters to diagnose the message issues. You need to configure the service. In the web.config file for the service, what should you do?

 

A.

In the service configuration diagnostics section, set the value of the performancCounters property to All.

B.

Enable message logging for the endpoint.

C.

Enable the Windows Management Instrumentation (WMI) provider.

D.

In the service configuration diagnostics section, set the value of the performanceCounters property to ServiceOnly.

 

Correct Answer: A

 

Instant Access to Download Latest Complete Collection of Microsoft 70-513 Real Exam

Try Microsoft 70-513 Free Demo