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 Windows Communication Foundation (WCF) client application. You

instantiate a client class that inherits from ClientBase. The client instance must always be
shut down in such a way that it can free up any resources it is referencing. You need to
ensure that all exceptions are caught and the instance is always properly shut down. Which
code segment should you use?

Which element should you add to the system.serviceModel section in the application configuration file?

You are moving a Windows Communication Foundation (WCF) service into production. You
need to be able to monitor the health of the service. You only want to enable all
performance counter instances exposed by the ServiceModelService 4.0.0.0 counter group.
Which element should you add to the system.serviceModel section in the application
configuration file?

You need to send the stack trace of any unhandled exceptions to clients as a fault message

You are implementing a Windows Communication Foundation (WCF) service contract
named IContosoService in a class named ContosoService. The service occasionally fails
due to an exception being thrown at the service. You need to send the stack trace of any
unhandled exceptions to clients as a fault message. What should you do?

What should you do?

You are creating a Windows Communication Foundation (WCF) service that accepts
messages from clients when they are started. The message is defined as follows.
<MessageContract()> Public Class Agent Public Property CodeName As String Public
Property SecretHandshake As String End Class You have the following requirements: The
CodeName property must be sent in clear text. The service must be able to verify that the
property value was not changed after being sent by the client. The SecretHandshake
property must not be sent in clear text and must be readable by the service. What should
you do?

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.) 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.
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 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 Dim myBinding As BasicHttpBinding = New BasicHttpBinding() 02 Dim
myEndpointAddress As EndpointAddress = New EndpointAddress(
“http://contoso.com/TaxService.svc”) 03 04 Dim client As ITaxService =
channelFactory.CreateChannel() 05 Dim data As String = client.GetData(1) You need to
consume the service. Which code segment should you insert at line 03?

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?

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. Dim client As TravelServiceClient = New
TravelServiceClient() You need to ensure that a callback is received when the GetFlight
operation is called asynchronously. Which code segment should you use?

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” 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?


Page 13 of 23« First...1112131415...20...Last »