Ensurepass

QUESTION 301

You are developing a Windows Communication Foundation (WCF) service that is used to check the status of orders placed by customers. The following code segment is part of your service. (Line numbers are included for reference only.)

 

clip_image001

 

You need to ensure that the service always listens at net.pipe://SupplyChainServer/Pipe. What should you do?

 

clip_image003

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 302

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

 

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

 

clip_image004

 

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.

 

clip_image005

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 303

You develop a Windows Communication Foundation (WCF) SOAP service that contains a class named Order. The Order class includes a field named secret that stores private data.

 

clip_image006

 

The service has the following requirements:

 

clip_image008The secret field must be encrypted.

clip_image008[1]All other fields in the Order class must serialize as plain text.

 

You need to configure serialization for the Order class.

 

What should you do?

 

A.

Add a MessageBodyMember attribute to the secret field and set the ProtectionLevel to Sign.

Add a MessageBodyMember attribute to each of the other fields of the class.

B.

Add a MessageHeader attribute to the secret field and set the ProtectionLevel to Sign.

Add a MessageBodyMember attribute to each of the other fields of the class.

C.

Add a MessageHeader attribute to the secret field and set the ProtectionLevel to EncryptAndSign.

Add a MessageBodyMember attribute to each of the other fields of the class.

D.

Add a MessageBodyMember attribute to the secret field and set the ProtectionLevel to EncryptAndSign.

Add a MessageBodyMember attribute to each of the other fields of the class.

 

Correct Answer: A

 

 

QUESTION 304

You are configuring a routing service to call a target service. The routing service has no knowledge of the target service’s data types other than the service contract. The operation contract for all of the methods of the target service specifies IsOneWay=true. You need to specify the endpoint information for the routing service. What should you do?

 

A.

In the target service configuration file, specify “*” for the client endpoint contract and “*” for the service endpoint contract.

B.

In the routing service configuration file, specify “*” for the client endpoint contract and System.ServiceModel.Routing.ISimplexDatagramRouter for the service endpoint contract.

C.

In the routing service configuration file, specify “*” for the client endpoint contract and “*” for the service endpoint contract.

D.

In the routing service configuration file, specify “*” for the client endpoint contract and System.ServiceModel.Routing.IRequestReplyRouter for the service endpoint contract.

 

Correct Answer: B

 

 

 

 

QUESTION 305

You are developing a Windows Communication Foundation (WCF) service. The service configuration file has a <System.Diagnostics> element defined. You need to ensure that all security audit information, trace logging, and message logging failures are recorded. Which configuration segment should you add to the <System.Diagnostics> element?

 

clip_image010

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: C

 

 

QUESTION 306

You are using windows Communication Foundation (WCF) to create a service. You need to implement a custom message-level security binding element. Which binding element should you use?

 

A.

TransportSecurityElement

B.

HttpsTransportBindingElement

C.

SslStreamSecuntyBindingElement

D.

WindowsStreamSecurityBindingElement

 

Correct Answer: A

 

 

QUESTION 307

A Windows Communication Foundation (WCF) client application is consuming an RSS syndication feed from a blog. You have a SyndicationFeed variable named feed. The application iterates through the items as follows. (Line numbers are included for reference only.)

 

01 foreach (SyndicationItem item in feed.Items)

 

02 {

 

03 }

 

You need to display the content type and body of every syndication item to the console.

 

Which two lines of code should you insert between lines 02 and 03?

 

A.

Console.WriteLine(item.Content.Type);

Console.WriteLine(((TextSyndicationContent)item.Content).Text);

B.

Console.WriteLine(item.Content.GetType());

Console.WriteLine(((TextSyndicationContent)item.Content).Text);

C.

Console.WriteLine(item.Content.Type);

Console.WriteLine(item.Content.ToString());

D.

Console.WriteLine(item.Content.GetType());

Console.WriteLine(item.Content.ToString());

 

Correct Answer: A

 

 

 

 

 

 

 

QUESTION 308

You develop a Windows Communication Foundation (WCF) service. You name the service MovieService in the Movie namespace. The service is hosted in Microsoft Internet Information Services (IIS). You copy the assembly containing the service to the bin folder in the virtual directory path. You need to set up the URI that is mapped to the service. What should you do?

 

A.

Add a Movie.svc file in the root of the virtual path with the following line.

<*8ServiceHost language””VB” Service “MovieService. svc “*>

B.

Add the following code segment to the web.config file.

<3erviceHostingEnvironment>

<serviceActivations>

<add relativeAddress=”./Movie.svc”

service=”Movie.MovieService”/>

</serviceActivacions>

</serviceHostingEnvironment>

C.

Add a Movie.svc file in the root of the virtual path with the following line.

<%@ServiceHosc language=”VB” Service=”MovieService”%>

D.

Add the following code segment to the web.config file.

<serviceHostingEnvironment>

<serviceActivacions>

<add reiativeAddress=”./Movie”

service=”Movie.MovieService”/>

</serviceActivations>

</serviceHostingEnvironmenc>

 

Correct Answer: B

 

 

QUESTION 309

You are creating a Windows Communication Foundation (WCF) service that implements the following service contract.

 

<ServiceContract()>

 

Public Interface IOrderProcessing

 

<OperationContract()>

 

Sub ApproveOrder(ByVal id As Integer)

 

End Interface

 

You need to ensure that only users with the Manager role can call the ApproveOrder method. What should you do?

 

A.

In the method body, check the Rights.PossessProperty property to see if it contains Manager.

B.

Add a PrincipalPermission attribute to the method and set the Roles property to Manager.

C.

Add a SecurityPermission attribute to the method and set the SecurityAction to Demand.

D.

In the method body, create a new instance of WindowsClaimSet.

Use the FindClaims method to locate a claimType named Role with a right named Manager.

 

Correct Answer: B

 

 

 

QUESTION 310

DRAG DROP

You create a Windows Communication Foundation (WCF) service. The service must be multi-threaded and maintain state across threads. You need to create the code for the service. Which code segments should you use? (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_image012

 

Correct Answer:

clip_image014

 

 

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

Try Microsoft 70-513 Free Demo