Ensurepass

QUESTION 231

You are developing a Windows Communication Foundation (WCF) service that executes a long-running operation. The service is accessed from your business applications in a server transaction in which the client does not participate. You need to ensure that the transaction times out and aborts if the operation has not completed within 45 seconds. What should you do?

 

A.

Set the service binding sendTimeout attribute to 00:00:45.

B.

Apply <OperationBehavior (TransactionScopeRequired:=False) > to the service operation.

C.

Set the service binding receiveTimeout attribute to 00:00:45.

D.

Apply OerviceBehavior (TransactlonTiitieout: = “00:00:45”)> to the service implementation.

 

Correct Answer: D

 

 

QUESTION 232

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 the Windows Management Instrumentation (WMI) provider.

C.

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

D.

Enable message logging for the endpoint.

 

Correct Answer: A

 

 

QUESTION 233

You are creating a Windows Communication Foundation (WCF) service. You need to ensure that the service is compatible with ASP.NET to make use of the session state. Which binding should you use?

 

A.

NetTcp ContextBinding

B.

BasicHttpContextBinding

C.

NetTcp Binding

D.

NetMsmqBinding

 

Correct Answer: B

 

 

 

 

 

 

 

 

 

QUESTION 234

You are configuring services to be discoverable. The services must be discoverable without relying on a central server. Client applications that consume the services are on a network segment that is separate from the network segment that the services are located on. A firewall blocks all TCP ports between the two network segments, but allows other protocols to pass through. You need to ensure that the client applications can discover the services. What should you do?

 

A.

Use ad-hoc discovery mode over HTTP.

B.

Use ad-hoc discovery mode over UDP.

C.

Use managed discovery mode over HTTP.

D.

Use managed discovery mode over UDP.

 

Correct Answer: B

 

 

QUESTION 235

An ASP NET application hosts a RESTful Windows Communication Foundation (WCF) service at /ServiceslContoso.svc.

 

The service provides a JavaScript resource to clients. You have an explicit reference to the JavaScript in your page markup as follows:

 

<script type = text/javaScript’ srcsIServices/Contoso. svc/js” />

 

You need to retrieve the debug version of the service JavaScript.

 

What should you do?

 

A.

In the <%@ ServiceHost %> header for /ServiceslContoso.svc, set the Debug attribute to true.

B.

In the <%@ Page %s header, set the Debug attribute to true.

C.

In the script tag, add a debug attribute and set its value to true.

D.

In the script tag, append debug to the src attribute

 

Correct Answer: D

 

 

QUESTION 236

You are creating a Windows Communication Foundation (WCF) service that responds using plain-old XML (POX).

 

You have the following requirements:

 

clip_image002You must enable the /catalog.svc/items operation to respond using the POX, JSON, or ATOM formats. You also must ensure that the same URL is used regardless of the result type.

clip_image002[1]You must determine the response format by using the Accepts HTTP header.

 

What should you do?

 

A.

Implement the IChannelInitializer interface in the service class.

B.

Implement the System.Runtime.Serialization.IFormatterConverter interface in the service class.

C.

Set the BodyStyle parameter of the WebGet attribute on the operation to WebMessageBodyStyle.WrappedResponse.

D.

Set the return type of the operation to System.ServiceModel.Channels.Message. Use the current WebOperationContext methods to return the data in the required format.

 

Correct Answer: D

 

 

QUESTION 237

You have an existing Windows Communication Foundation (WCF) Web service. The Web service is not responding to messages larger than 64 KB. You need to ensure that the Web service can accept messages larger than 64 KB without generating errors. What should you do?

 

A.

Increase the value of maxReceivedMessageSize on the endpoint binding.

B.

Increase the value of maxRequestLength on the httpRuntime element.

C.

Increase the value of maxBufferSize on the endpoint binding.

D.

Increase the value of maxBufferPoolSize on the endpoint binding.

 

Correct Answer: A

 

 

QUESTION 238

You are developing a Windows Communication Foundation (WCF) service to replace an existing ASMX Web service.

 

The WCF service contains the following code segment. (Line numbers are included for reference only.)

 

clip_image003

 

The existing Web service returns the EmployeeID as an attribute of the EmployeeInfo element in the response XML.

 

You need to ensure that applications can consume the service without code changes in the client.

 

What should you do?

 

A.

Insert the following code at line 02.

<DataConttactFormat()>

Insert the following code at line 22.

<DataMember ()>

B.

Insert the following code at line 02.

<XmlSerializerFormat()>

Insert the following code at line 22.

<XmlAtttibute()>

C.

Insert the following code at line 09.

<XmlSerializerFocmat()>

Insert the following code at line 22.

<XmlAttribute()>

D.

Insert the following code at line 20.

<DataContractFormat()>

Insert the following code at line 22.

<DataMember()>

 

Correct Answer: D

 

 

QUESTION 239

Your company has an existing Windows Communication Foundation (WCF) service that allows business partners to place orders. The service uses netMsmqBinding. You find that processing every order in its own transaction is causing a delay. You need to ensure that the service is configured to process multiple orders in one transaction. What should you do?

 

A.

Use <serviceThrottling> service behavior and set the maxConcurrentCalls attribute.

B.

Use <transactedBatching> endpoint behavior and set the maxBatchSize attribute.

C.

Use <dispatcherSynchronizationBehavior> endpoint behavior and set the maxPendingReceives attribute.

D.

Use <synchronousReceive> endpoint behavior.

 

Correct Answer: B

 

 

QUESTION 240

You are developing a Windows Communication Foundation (WCF) client application. You instantiate a client class that inherits from ClientBase. The client instance must always be shut down in such a way that tt can free up any resources it is referencing. You need to ensure that all exceptions are caught and the instance is always properly shut down. Which code segment should you use?

 

clip_image004

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: B

 

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

Try Microsoft 70-513 Free Demo