PrepAway - Latest Free Exam Questions & Answers

You need to ensure that the stack trace details of the exception are not included in the error information sen

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 (includeExceptionDetàilslnFaults = true) 1 03putiic class OrderService
04{ 05[Operation Contract] 06putiic void Submit Order (Order an Order) 07{ O8try 09{ 10…
11) 12catch (DivideByZeroExcepton ex) 13{ 14 15) 16) 17) 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 14 with the following line throw new FaultException<Order>(anOrder,
ex.ToString(fl;

B.
After hne 05, add the following line. [FaultContract(typeof(FaukEception<Order>))J
Replace line 14 with the following line throw ex;

C.
Replace line 14 with the following line. Throw:

D.
Alter hne 05, add the following line [FaultContract(typeof(FaultException<Order>))J
Replace line 14 with the following line. Throw new FaultException<Order>(anOrder, “Divide

by zero exception”):


Leave a Reply