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 use to decorate the service?

You are developing a Windows Communication Foundation (WCF) service that does not
operate on a duplex channel. You find that operations do not start until all previous
operations have finished. The service hosting code contains the following lines. Dim service
= New WarehouseService() Dim hose = New ServiceHost(service) You need to ensure that
new operations do not wait for previous operations to finish. Which attribute should you use
to decorate the service?

Which code segment should you insert at line 07?

You are developing a Windows Communication Foundation (WCF) service to provide an
in-memory cache for many Web applications. The service contract is defined as follows.
(Line numbers are included for reference only.) 01 <ServiceContract()> 02 Public Interface
IDataCache 03 04 . . . 05 End Interface 06 07 08 Public Class DataCache 09 Implements
IDataCache 10 11 . . . 12 End Class You need to ensure that all users share the cache.
Which code segment should you insert at line 07?

Which code segment should you use?

You are consuming a Windows Communication Foundation (WCF) service. The service
interface is defined as follows. <DataContract(Namespace:=””)> Public Class Item End
Class ServiceContract (Namespace: =””) > Public Interface ICatalog <OperationContract()>
<WebInvoke(Method:=”POST*’, UriTemplate:=”/Item”) > Function Updateltem(ByVal item
As Item) As Item End Interface The client application receives a WebResponse named
response with the response from the service. You need to deserialize this response into a
strongly typed object representing the return value of the method. Which code segment
should you use?

Which code segment should you use?

You are developing a new version of an existing message contract named
CustomerDetailsVersion1. The new version of the message contract must add a
Department field of type String to the SOAP header. You create a new class named
CustomerDetailsVersion2 that inherits from CustomerDetailsVersion1. You need to ensure
that all client applications can consume the service. Which code segment should you use?

You need to ensure that applications can consume the service without code changes in the client

You are developing a Windows Communication Foundation (WCF) service to replace an
existing ASMX Web service. The WCF service contains the following code segment. (Line
numbers are included for reference only.) 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. What should you
do?

You need to restrict the collection of WMI data to a privileged account

You create a Windows Communication Foundation (WCF) sen/ice. It is deployed on
Microsoft Internet Information Services (IIS) with an application pool running as Network
Service. You enable WMI tracing before launching the service. Your IT support staff adds
WMI data collection through ASP.NET WMI tracing. You need to restrict the collection of
WMI data to a privileged account. What should you do in WMI Control in the Computer
Management console?

Which two actions should you perform?

You are developing a Windows Communication Foundation (WCF) service to provide an
in-memory cache. The following code is part of your solution. (Line numbers are included for
reference only.) 01 02 Public Interface IlnMemoryCacheService 03 04
<OperationContract()> 05 Function GetCachedItem( ByVal key As String) As String 06 07
<OperationContract() > 08 Sub CacheItem( ByVal key As String, ByVal item As String) 09
10 End Interface 11 12 <ServiceBehavior(
InstanceContextMode:=InstanceContextHode.Single)> 13 Public Class CacheService 14
Implements IlnHemoryCacheService 15 16 Dim cache As Hashtatale – New Hashtable)> 17
18 Public Function GetCachedItem( ByVal key As String) As String mplements
IInHemoryCacheService.GetCachedltem 19 20 Return cache (key) .ToStrlng() 21 22 End
Function 23 24 Public Sub Cacheltem( ByVal key As String, ByVal item As String)
Implements ilnMemoryCacheService.Cacheltem Then 25 26 If (cache.Contains(key) 27
cache.Remove(key) 28 End If 29 30 cache.Add(key, item) 31 32 End Sub 33 34 End Class
Users report that the cache is getting updated with cache changes of other users. You need
to ensure that each user’s cache is maintained and isolated from other users. Which two
actions should you perform? (Each correct answer presents part of the solution. Choose
two.)

Which code segment should you add at line 04?

You are developing a Windows Communication Foundation (WCF) service. You enable
message logging, trace listeners, activity propagation, and tracing on the trace sources. You
have the following code segment in the client application. (Line numbers are included for
reference only.) You encounter errors when your client application consumes the service.
You need to ensure that your client application can correlate tracing information with the
service. Which code segment should you add at line 04?


Page 20 of 23« First...10...1819202122...Last »