Exam Name: UPG:Trans MCPD.
NET Frmwk 3.
5 Dev Skil to .
NET 4 Wndws App Development
Exam Type: Microsoft Exam Code: 70-521
Certification Microsoft Certified Professional Developer (MCPD) Total Questions: 108
Page 1 of 3 www.
examsheets.
net
Question: 1
You...
More
Exam Name: UPG:Trans MCPD.
NET Frmwk 3.
5 Dev Skil to .
NET 4 Wndws App Development
Exam Type: Microsoft Exam Code: 70-521
Certification Microsoft Certified Professional Developer (MCPD) Total Questions: 108
Page 1 of 3 www.
examsheets.
net
Question: 1
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(IncludeExceptionDetailsInFaults = true)]
03 public class OrderService
04 {
05 [OperationContract]
06 public void SubmitOrder(Order anOrder)
07 {
08 try
09 {
10 .
.
.
11 }
12 catch(DivideByZeroException ex)
13 {
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?
A.
Replace line 14 with the following line.
throw;
B.
Replace line 14 with the following line.
throw new FaultException<Order>(anOrder, ex.
ToString());
C.
After line 05, add the
Less