PrepAway - Latest Free Exam Questions & Answers

What should you do?

You are creating a Windows Communication Foundation (WCF) service that is implemented as follows. (Line numbers are included for reference only.)
01 <ServiceContract()>
02 <ServiceBehavior(IncludeExceptionDetailInFaults:=True)>
03 Public Class OrderService
04
05 <OperationContract()>
06 Public Sub SubmitOrder(ByVal anOrder As Order)
07
08 Try
09 …
10 Catch ex As DivideByZeroException
11
12 End Try
13 End Sub
14
15 End Class
You need to ensure that the stack trace details of the exception are not included in the error information sent to the client. What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Replace line 11 with the following line. Throw

B.
Replace line 11 with the following line. Throw New FaultException(Of Order)(anOrder, ex.ToString())

C.
After line 05, add the following line. <FaultContract(GetType(FaultException(Of Order)))> Replace line 11 with the following line. Throw ex

D.
After line 05, add the following line.
<FaultContract(GetType(FaultException(Of Order)))> Replace line 11 with the following line. Throw New FaultException(Of Order)( anOrder, “Divide by zero exception”)


Leave a Reply