Home » [Free] Get all latest Microsoft 70-513 Actual Tests 241-250

[Free] Get all latest Microsoft 70-513 Actual Tests 241-250

Ensurepass

QUESTION 241

You are adding a Windows Communication Foundation (WCF) service to an existing application.

 

The application is configured as follows. (Line numbers are included for reference only.)

 

clip_image001

 

You need to configure the service to publish the service metadata.

 

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

 

A.

Add the following XML segment between lines 10 and 11.

<endpoint address= “”

binding= ” mexHttpBinding “

contract= ” IMetadataExchange “

/>

B.

Add the following XML segment between lines 10 and 11.

<endpoint address=””

binding= ” basic HttpBinding “

contract= ” IMetadataExchange ” />

C.

Add the following XML segment between lines15 and 16.

< serviceDiscovery >

< announcementEndpoints >

<endpoint address=””/>

</ announcementEndpoints >

</ serviceDiscovery >

D.

Add the following XML segment between lines 15 and 16.

< serviceMetadata httpGetEnabled =”true” />

 

Correct Answer: AD

 

 

 

 

 

QUESTION 242

DRAG DROP

You develop a Windows Communication Foundation (WCF) service that is hosted within a console application. The service implements the IRegistrationService interface in a class named RegistrationService. You need to add code to the console application to host the WCF service. How should you complete the relevant code? (To answer, drag the appropriate code segment to the correct location 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_image003

 

Correct Answer:

clip_image005

 

 

QUESTION 243

You are creating an application that consumes a Windows Communication Foundation (WCF) service. The service implements the IService contract. The client application contains the CallbackHandler class, which implements IServiceCallback. You need to ensure that a client proxy is created that can communicate with the service over a duplex channel. Which code segment should you use?

 

A.

var handler = new CallbackHandler();

var clientFactory = new DuplexChannelFactory<IService>{

new WSHttpContextBinding() ;

var clienc = clientFactory.CreateChannelt

new InstanceContext (handler) , new EndpointAddress (“···”));

B.

var handler = new CallbackHandler();

var clientFactory =

new DuplexChonnelFaccory<IService>{

typeof(CallbackHandler), new WSDualHttpBinding ());

var client = clientFactory.CreateChannel(

new InstanceContext (handler) , new EndpointAddress (“···”));

C.

var handler = new CallbackHandler();

var clientFactory = new DuplexChannelFactory<IService>{

new WSHttpBinding());

var client = clientFactory.CreateChannel(

new InstanceContext (handler) , new EndpointAddress (“···”));

D.

var handler = new CallbackHandler();

var clientFactory = new DuplexChannelFactory<IService>{

typeof(CallbackHandler), new WSDualHttpBinding());

var client = clientFactory.CreateChannel(

new EndpointAddress (“···”)) ;

 

Correct Answer: B

 

 

QUESTION 244

The endpoint of a Windows Communication Foundation (WCF) service uses basicHttpBinding for its binding. Your company’s policies have changed to require that messages not be sent in clear text. You must ensure that all messages are encrypted when traveling across the network. What should you do?

 

A.

Set the ProtectionLevel property on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBinding.

B.

Set the ProtectionLevel property on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to webHttpBinding.

C.

Set the PrincipalPermissionAttribute on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBinding.

D.

Set the PrincipalPermissionAttribute on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to wsHttpBinding.

 

Correct Answer: A

 

 

QUESTION 245

A Windows Communication Foundation (WCF) service sends notifications when the service is started and stopped. You need to implement a client that logs these notifications. Which class should you use?

 

A.

AnnouncementService

B.

AnnouncementClient

C.

DiscoveryClient

D.

HttpListener

 

Correct Answer: A

 

 

QUESTION 246

You are developing a client that sends several types of SOP messages to a Windows Communication Foundation (WCF) service method named PostData PostData is currently defined as follows:

 

[OperationContract?

 

void PostData(Order data);

 

You need to modify PostData so that it can receive any SO6P message. Which code segment should you use?

 

A.

[OperaionContract0sOneWay true, Action = `v’, ReplyAction void PostData(Order data);

B.

(OperationContract(1sOneWay = true, Action “v’, ReplyAction = “.`) addPostData(BodyWriterdata);

C.

[OperaionContract] void PostDaa(BodyWriter data);

D.

[OperationContract] void PostDaa(Message data);

 

Correct Answer: D

 

 

QUESTION 247

The endpoint of a Windows Communication Foundation (WCF) service uses basicHttpBinding for its binding. Your company’s policies have changed to require that messages not be sent in clear text. You must ensure that all messages are encrypted when traveling across the network. What should you do?

 

A.

Set the ProtectionLevel property on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBinding.

B.

Set the ProtectionLevel property on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to webHttpBinding.

C.

Set the PrincipalPermissionAttribute on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBinding.

D.

Set the PrincipalPermissionAttribute on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to wsHttpBinding.

 

Correct Answer: A

 

 

QUESTION 248

A Windows Communication Foundation (WCF) client and service share the following service contract interface.

 

[ServiceContract]

 

public interface IContosoService {

 

[OperationContract]

 

void SavePerson(Person person);

 

}

 

They also use the following binding.

 

NetTcpBinding binding new NetTcpBinding { TransactionFlow = true };

 

The client calls the service with the following code

 

using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required))

 

{ IContosoService client = factoryCreateChannelO;

 

client SavePerson(person);

 

ConsoleWriteLine(

 

TransactionCurrentTransactionlnformation.

 

Distributedldentifier);

 

tsCompleteO;

 

}

 

The service has the following implementation for SavePerson

 

public void IContosoService SavePerson(Person person)

 

{ person.Saveo;

 

ConsoleWriteLine(TransactionCurrentTransactionlnformation.

 

Distributedidentifier);

 

}

 

The distributed identifiers do not match on the client and the server

 

You need to ensure that the client and server enlist in the same distributed transaction

 

What should you do?

 

A.

Add the following attributes to the SavePerson operation on IContosoService.

[OperationBehavior(TransactionScopeRequired = true)]

[TransactionFlow(TransactionFlowOption.

Mandatory)]

B.

Add the following attributes to the SavePerson operation on lContosoService

[TransactionFlow(TransactionFlowOption Mandatory)]

[OperationBehavior(TransactionScopeRequired true)]

C.

Add the following attribute to the SavePerson operation on lContosoSernce

[OperationBehavior(TransactionScopeRequired true)]

Add the following attribute to the implementation of

SavePerson. ITransactionFlow(TransactionFlowOptionAllowed)]

D.

Add the following attribute to the SavePerson operation on lContosoService

[TransactionFlow(TransactionFlowOption Allowed)]

Add the following attribute to the implementation of

SavePerson. [OperationBehavior(TransactionScopeRequired true)]

 

Correct Answer: D

 

 

QUESTION 249

You are creating a Windows Communication Foundation (WCF) service. The service endpoints change frequently. On the service, you add a new ServiceDiscoveryBehavior to the Behaviors collection of the ServiceHost Description property. You need to ensure that client applications can communicate with the service and discover changes to the service endpoints. What should you do?

 

A.

Add a new ServiceDiscoveryBehavior to the Behaviors collection in the client application.

B.

Add a new AnnouncementClient to the Behaviors collection in the client application.

C.

Use the FindCriteria class and the UdpDiscoveryEndpoint class to set up the binding in the client application.

D.

Use the DiscoveryProxy class and the EndpointDiscoveryMetadata class to set up the binding in the client application.

 

Correct Answer: C

 

 

QUESTION 250

You are developing an application that performs file backups in the background. The background application will host a Windows Communication Foundation (WCF) service and must be active as soon as the machine is running. The background application will not have a user interface. A front-end application will consume the WCF service and will provide the user interface. You need to choose a host environment for the WCF service. Which hosting environment should you choose?

 

A.

Microsoft Internet Information Services (IIS) 6.0

B.

Windows Process Activation Services (WAS)

C.

a Windows Forms application

D.

a Windows Service

 

Correct Answer: D

 

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