PrepAway - Latest Free Exam Questions & Answers

Tag: Exam 70-513 (update October 28th, 2015)

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

You need to ensure that the service operation is always executed within a transaction

You are modifying a Windows Communication Foundation (WCF) service that allows
customers to update financial dat a. The service currently requires a transaction from the
client application and is working correctly. The service contract is defined as follows. (Line
numbers are included for reference only.) The service must be modified so that client
applications do not need to initiate a transaction when calling the operation. The service
must use the client application’s transaction if one is available. Otherwise it must use its
own transaction. You need to ensure that the service operation is always executed within a
transaction. What should you do?

You need to ensure that messages are secure and users are authenticated

You develop a Windows Communication Foundation (WCF) service that uses basic
authentication for client credentials. This service is currently configured to use message
security. The service is hosted on a server in workgroup mode. Users report that their
passwords are stolen when they use public computers. You need to ensure that messages
are secure and users are authenticated. You prevent the service from being called over
HTTP through Microsoft Internet Information Services (IIS) configuration. What should you
do next?

Which code segment should you insert at line 04?

You are developing a Windows Communication Foundation (WCF) REST service to provide
access to a library book catalog. The following code segment defines the service contract.
(Line numbers are included for reference only.) Library patrons want the ability to search the
catalog by title. You need to ensure that the GetBookByTitle method is exposed as a
service method. Which code segment should you insert at line 04?

You need to ensure that the generated proxy does not block the calling thread when executing a service method

You are creating an application using Visual Studio 2010. The application consumes a
Windows Communication Foundation (WCF) service. You are adding a service reference to
the WCF service. You need to ensure that the generated proxy does not block the calling
thread when executing a service method. What should you do when adding the service
reference?

You need to ensure that the transaction is aborted if the Update method is not successful

You are developing a Windows Communication Foundation (WCF) service that allows

customers to update financial dat a. The client applications call the service in a transaction.
The service contract is defined as follows. (Line numbers are included for reference only.)
01 <ServiceContract()> 02 Public Interface IDatallpdate 03 04 <OperationContract()> 05
<TransactionFlow(TransactionFlowOption.Handatocy)> 06 Sub Update (ByVal
accountNumber As String, ByVal amount As Double) 07 08 End Interface 09 10 Class
UpdateService 11 Implements IDataUpdate 12 13 <OperationBehavior(
TransactionScopeRequired:=True, TransactionAutoComplete:=True)> 14 Public Sub
Update(ByVal accountNumber As String, ByVal amount As Double) Implements
IDataUpdate.Update IS 16 Try 17 18 Catch ex As Exception 19 WriteErrorLog(ex) 20 21
End Try 22 23 End Sub 24 25 End Class Customers report that the transaction completes
successfully even if the Update method throws an exception. You need to ensure that the
transaction is aborted if the Update method is not successful. What should you do?

You need to ensure that RecordPayments can correctly deserialize into an Employee or a Customer object

You are developing a Windows Communication Foundation (WCF) service that contains the
following service contract. <ServiceContract() > Public Interface IPaymentService
<OperationContract() > Sub RecordPayments(ByVal person As Person) End Interface

Public Class Person End Class Public Class Employee Inherits Person End Class Public
Class Customer Inherits Person End Class You need to ensure that RecordPayments can
correctly deserialize into an Employee or a Customer object. What should you do?

Which type of exception should the client catch?

You are developing a client application that consumes a Windows Communication
Foundation (WCF) service. The operation contract is as follows. <OperationContract()>
<FaultContract(GetType(SalesFault))> Function GetSales(ByVal saieId As String) As String
The service configuration file contains the following line in the serviceBehaviors section.
<behovior> oerviceDebug includeExceptionDetoilInFaults-“True’V> </behavior> A
divide-by-zero exception is not being handled by the service. You need to ensure that the
exception is caught in the client application. Which type of exception should the client
catch?


Page 19 of 23« First...10...1718192021...Last »