[Free] Get all latest Microsoft 70-513 Actual Tests 121-130

Ensurepass

QUESTION 121

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

 

Correct Answer: D

 

 

 

 

QUESTION 122

You are using tracing to diagnose run-time issues when you look at the traces for the service in Svc Trace viewer exe, you see what is shown in the exhibit (Click the Exhibit button)

 

clip_image002

 

The exception trace is selected in Svc Trace reviewer exe.

 

You need to interpret the trace results to determine where the error occurred and what to do next.

 

What should you do?

 

A.

This issue occurred in the ServiceHost during ServiceHost Open.

Enable WMI by adding the following configuration to the system.serviceModel configuration section in the application configuration file

<diagnostics wmiProviderEnabledetrue’!>

Restart the application and inspect the endpoints visible through WMI

B.

This issue occurred in the Service Host during Service Host. Open. Compare the security settings for any endpoints that use an MSMQ transport to the security configuration of the MSMQ queue used by the endpoint.

C.

This issue occurred at the Service Host when receiving a message Compare the security configurations on the client and server to make sure that they are compatible.

D.

This issue occurred at the ServiceHost when accepting an initial set of messages from MSMQ.Log all messages sent between the clients and sever.

 

Correct Answer: B

 

 

 

 

QUESTION 123

DRAG DROP

You are creating a Windows Communication Foundation (WCF) service. The service must be able to transmit messages back to the client application. You need complete the web.config file for the service. How should you complete the relevant markup? (To answer, drag the appropriate markup segments to the correct location or locations in the answer area. Each markup 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_image004

 

Correct Answer:

clip_image006

 

 

 

 

 

 

 

 

 

 

 

QUESTION 124

Your company has an existing Windows Communication Foundation (WCF) service. The following code segment is part of the service. (Line numbers are included for reference only.)

 

clip_image007

 

You need to ensure that AJAX client applications can access the service.

 

Which code segment should you insert at line 02?

 

clip_image008

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: B

 

 

QUESTION 125

You need to modify a client application that consumes a Windows Communication Foundation (WCF) service. The service metadata is no longer available. You need to modify the previously generated proxy to include asynchronous calls to the service. What should you do?

 

A.

Update the service reference with the Generate asynchronous operations option.

B.

Create a partial class for the previously generated proxy and include the new asynchronous methods.

C.

Create a class with the same name as the previously generated proxy and add the new asynchronous methods. Add the new class to a namespace that is different from the original proxy.

D.

Create a class with the same name as the previously generated proxy and add the new asynchronous methods as partial methods. Add the new class to a namespace that is different from the original proxy.

 

Correct Answer: B

 

 

QUESTION 126

You are developing an application to update a users social status. You need to consume the service using Windows Communication Foundation (WCF).

 

The client configuration is as follows:

 

<system.serviceModel>

 

<bindings>

 

<webHttpBinding>

 

<binding name=”SocialConfig”>

 

<security mode=”TransportCredentialOnly”>

 

<transport clientCredentialType=”Basic”

 

realm=”Social API” />

 

</security>

 

</binding>

 

</webHttpBinding>

 

</bindings>

 

<client>

 

<endpoint address= ” http:// contoso .com “

 

binding=”webHttpBinding”

 

bindingConfiguration=”SocialConfig”

 

ontract=”ISocialStatus”

 

name=”SocialClient” />

 

</client>

 

</system.serviceModel>

 

The service contract is defined as follows.

 

<ServiceContract()>

 

Public Interface ISocialStatus

 

<OperationContract()>

 

<WebInvoke(UriTemplate:=”/statuses/update.xml?status={text}”)>

 

Sub UpdateStatus(ByVal text As String)

 

End Interface

 

Which code segment should you use to update the social status?

 

A.

Using factory As WebChannelFactory(Of ISocialStatus) =

New WebChannelFactory(Of ISocialStatus)(“SocialClient”)

factory.Credentials.UserName.UserName = user.Name

factory.Credentials.UserName.Password = user.Password

Dim socialChannel As ISocialStatus =

factory.CreateChannel()

socialChannel.UpdateStatus(newStatus)

End Using

B.

Using factory As ChannelFactory(Of ISocialStatus) =

New WebChannelFactory(Of ISocialStatus)(GetType(ISocialStatus))

factory.Credentials.UserName.UserName = user.Name

factory.Credentials.UserName.Password = user.Password

Dim socialChannel As ISocialStatus =

factory.CreateChannel()

socialChannel.UpdateStatus(newStatus)

End Using

C.

Using factory As ChannelFactory(Of ISocialStatus) =

New ChannelFactory(Of ISocialStatus)(“POST”)

factory.Credentials.Windows.ClientCredential.UserName = user.Name

factory.Credentials.Windows.ClientCredential.SecurePassword.SetAt( 0, user.Password)

Dim socialChannel As ISocialStatus = factory.CreateChannel()

socialChannel.UpdateStatus(newStatus)

End Using

D.

Using factory As WebChannelFactory(Of ISocialStatus) =

New WebChannelFactory(Of ISocialStatus)(GetType(ISocialClient))

factory.Credentials.Windows.ClientCredential.UserName = user.Name

factory.Credentials.Windows.ClientCredential.SecurePassword.SetAt( 0, user.Password)

Dim socialChannel As ISocialStatus = factory.CreateChannel()

socialChannel.UpdateStatus(newStatus)

End Using

 

Correct Answer: A

 

 

 

 

 

 

QUESTION 127

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

}

}

 

Correct Answer: B

 

 

QUESTION 128

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

 

[ServiceContract(SessionMode SessionModeAllowed)] public interface IMyService {

 

[OperaionContractQsTerminating false) void lnitialize0;

 

[OperaionContractQslnitiating false)] Void DoSomethingO;

 

[OperaionContractQsTerminating true)J void TerminateO;

 

}

 

You need to change this interface so that:

 

`Initialize is allowed to be called any time before Terminate is called

 

“DoSomething is allowed to be called only after Initialize is called, and n allowed to be called after Terminate is called “Terminate will be lowed to be called only after Initialize is called

 

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

Choose two)

 

A.

Change the ServiceContract attribute of the IMyService interface to the following:

ServiceContract(SessionMode = SessionMode Required)

B.

Change the ServiceContract attribute of the IMyService interface to the following:

ServiceContract(SessionMode SessionMode Allowed)

C.

Change the OperationContract attribute of the Initialize operation to the following:

OperationContract(initiating = true, IsTerminating = false)

D.

Change the OperationContract attribute of the Terminate operation to the following:

OperationContract(klnitiating = fase, IsTerminating = true)

 

Correct Answer: AD

 

 

QUESTION 129

You have an existing Windows Communication Foundation (WCF) service that exposes a service contract over HTTP using explicit binding configuration. You need to expose that contract over HTTP and TCP. What should you do?

 

A.

Add a net.tcp base address to the host.

B.

Add an endpoint configured with a netTcpBinding.

C.

Add an endpoint behavior named netTcpBehavior to the existing endpoint.

D.

Add a binding configuration to the existing endpoint named netTcpBinding.

 

Correct Answer: B

 

 

QUESTION 130

A Windows Communication Foundation (WCF) 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 implemented as follows. (Line numbers are included for reference only.)

 

01 ServiceHost host = new ServiceHost(typeof(RoutingService));

 

02 host AddServiceEndpoint(

 

03 typeof(lSimplexDatagramRouter),

 

04 new NetTcpBinding0, “net.tcp:/flocalhostlRouter”

 

05);

 

06 List <ServiceEndpoints lep new List <ServiceEndpoint>0;t

 

07 lep.Add(

 

08 new ServiceEndpoint(

 

09 ContractDescription.GetContract(

 

10 typeof(lSimplexDatagramRouter)

 

11),

 

12 new NetTcpBinding0,

 

13 new EndpointAddress|’nettcp://localhost: 8080/Logger”)

 

14)

 

15);

 

16 RoutingConfiguration rc new RoutingConfigurationO;

 

17 FilterTable.Add(new MatchAilMessageFilterO, lep);

 

18 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 03 as follows:

typeof(l RequestReplyRouter),

B.

Change line 03 as follows:

typeof(lDuplexSessionRouter),

C.

Change line 10 as follows:

typeof(lRequestReplyRouter)

D.

Change line 10 as follows:

typeof(lDuplexSessionRouter)

 

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

This entry was posted in 70-513 Actual Tests and tagged , , , , , . Bookmark the permalink.