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 attribute should you add to the class that is implementing the service?

You are creating a Window s Communication Foundation (WCF) service application. The
application needs to service many clients and requests simultaneously. The application also
needs to ensure subsequent individual client requests provide a stateful conversation. You
need to configure the service to support these requirements. Which attribute should you add
to the class that is implementing the service?

You need to ensure that OperationOne and OperationTwo execute under the same transaction context when they are

A service implements the following contract. (Line numbers are included for reference only.)
The service is implemented as follows. ContosoService uses NetMsmqBinding to listen for
messages. The queue was set up to use transactions for adding and removing messages.
You need to ensure that OperationOne and OperationTwo execute under the same
transaction context when they are invoked in the same session. What should you do?

You need to change the service to allow up to the maximum number of executions of the methods of MessageDataba

A Windows Communication Foundation (WCF) solution exposes the following service over
a TCP binding. (Line numbers are included for reference only.) 01 [ServiceContract] 02
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)] 03 public class
DataAccessService 04 { 05 [OperationContract] 06 public void PutMessage(string message)
07 { 08 MessageDatabase.PutMessage(message); 09 } 10 [OperationContract] 11 public
string[] SearchMessages(string search) 12 { 13 return
MessageDatabase.SearchMessages(search); 14 } 15 } MessageDatabase supports a
limited number of concurrent executions of its methods. You need to change the service to
allow up to the maximum number of executions of the methods of MessageDatabase. This
should be implemented without preventing customers from connecting to the service. What
should you do?

Which two actions should you perform?

You develop a Windows Communication Foundation (WCF) service that employees use to
access bonus information. You define the following service contract. (Line numbers are
included for reference only.) 01 [ServiceContract(SessionMode = SessionMode.Required)]
02 public interface IFinancialService 03 { 04 [OperationContract] 05 string Login(int
employeeID, string passwordHash); 06 07 [OperationContract] 08 double GetBonus(int
month); 09 10 [OperationContract(IsTerminating = true)] 11 void Logout(); 12 } Client

applications can invoke methods without logging in. You need to ensure that the client
applications invoke Login before invoking any other method. You also need to ensure that
client applications cannot consume the service after invoking Logout. Which two actions
should you perform? (Each correct answer presents part of the solution. Choose two.)

You need to ensure that client applications can communicate with the service and discover changes to the servi

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?

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

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” contract=”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}”)] void UpdateStatus(string
text); } Which code segment should you use to update the social status?

Which code segment should you insert at line 03?

You are developing a client application that uses the following code to consume a Windows
Communication Foundation (WCF) service. (Line numbers are included for reference only.)
01 BasicHttpBinding myBinding = new BasicHttpBinding(); 02 EndpointAddress
myEndpointAddress = new EndpointAddress( “http://contoso.com/TaxService.svc”); 03 04
ITaxService client = channelFactory.CreateChannel(); 05 string data = client.GetData(1);
You need to consume the service. Which code segment should you insert at line 03?


Page 1 of 2312345...1020...Last »