PrepAway - Latest Free Exam Questions & Answers

Category: 70-513 (v.2)

Exam 70-513: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4 (update October 28th, 2015)

Which code segment should you use?

You are developing a client application that consumes a Windows Communication
Foundation (WCF) service. You use the svcutil.exe utility to create a proxy for the service.
You use the svcutil.exe switches that generate asynchronous calls. GetFlight is a service
operation that takes no parameters and returns a string. The GetFlightCallback method
must be called when the service operation returns. You create an instance of the client

proxy with the following code. var client = new TravelServiceClient(); You need to ensure
that a callback is received when the GetFlight operation is called asynchronously. Which
code segment should you use?

What are two possible ways to achieve this goal?

A Windows Communication Foundation (WCF) solution uses the following contracts. (Line
numbers are included for reference only.) 01 [ServiceContract(CallbackContract =
typeof(INameService))] 02 public interface IGreetingService 03 { 04 [OperationContract] 05
string GetMessage(); 06 } 07 08 [ServiceContract] 09 public interface INameService 10 { 11
[OperationContract] 12 string GetName(); 13 } When the client calls GetMessage on the
service interface, the service calls GetName on the client callback. In the client, the class
NameService implements the callback contract. The client channel is created as follows. 22
In stanceContext callbackContext = new InstanceContext(new NameService(“client”)); 25
DuplexChannelFactory<IGreetingService> factory = new
DuplexChannelFactory<IGreetingService>( typeof(NameService), binding, address); 26
IGreetingService greetingService = factory.CreateChannel(); You need to ensure that the
service callback is processed by the instance of NameService. What are two possible ways
to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

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

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?

which order should the binding stack be configured?

You are creating a Windows Communication Foundation (WCF) service. You have the
following requirements: Messages must be sent over TCP. The service must support
transactions. Messages must be encoded using a binary encoding. Messages must be
secured using Windows stream-based security. You need to implement a custom binding
for the service. In which order should the binding stack be configured?

Which two message filters should you add to the router?

A Windows Communication Foundation (WCF) solution uses two services to manage a
shopping cart. Service A processes messages containing line items that total between $0
and $500. Service B processes messages containing line items that total more than $500.
All messages are of equal importance to the business logic. You need to route incoming
messages to the appropriate services by using WCF routing. Which two message filters
should you add to the router? (Each correct answer presents part of the solution. Choose
two.)

Which interface should you implement in the data contract class?

You are developing a data contract for a Windows Communication Foundation (WCF)
service. The data in the data contract must participate in round trips. Strict schema validity
is not required. You need to ensure that the contract is forward-compatible and allows new
data members to be added to it. Which interface should you implement in the data contract
class?

You need to ensure that the service publishes the WSDL description at http://services.contoso.com/OrderLookupS

Your company has a Windows Communication Foundation (WCF) service at the URL
http://services.contoso.com/OrderLookupService.svc. The <system.serviceModel> section
of the configuration file is as follows. (Line numbers are included for reference only.) 01
<system.serviceModel> 02 <behaviors> 03 <serviceBehaviors> 04 <behavior> 05

<serviceDebug includeExceptionDetailInFaults=”false”/> 06 07 </behavior> 08
</serviceBehaviors> 09 </behaviors> 10
<serviceHostingEnvironmentmultipleSiteBindingsEnabled=”true” /> 11
</system.serviceModel> You need to ensure that the service publishes the WSDL
description at http://services.contoso.com/OrderLookupService.svc?wsdl. What should you
do?


Page 2 of 2312345...1020...Last »