Software job search
.net sql interview questions
  The best place for technical interview questions

 
Home.netSql serverAsp.netC#Vb.netAdo.netAjaxMcpd dumpsWord count tool
MCPD practice exams - 70-513 TS: Windows Communication Foundation Development with Microsoft .NET Framework 4 - Paper 1 - question 6135
MCPD - 70-513 TS: Windows Communication Foundation Development with Microsoft .NET Framework 4 - Paper 1 - question no 6135
Question. 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 [Operation Contract]
06 public void Submit Order(Order anOrder)
07 {
08 try
09 {
10 ...
11 }
12 catch(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?
   







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 following line.
[FaultContract(typeof(FaultException<Order>))]
Replace line 14 with the following line
throw ex;
D. Alter line 05, add the following line
[FaultContract(typeof(FaultException<Order>))]
Replace line 14 with the following line.
throw new FaultException<Order>(anOrder, "Divide by zero exception");
 Rate this question
     
 26 votes , average 3 out of 5

Next Question


Reader's opinions -

No comments
Loading

 
.net interview questions
Asp.net interview questions
C# interview questions
Vb.net interview questions
Ado.net interview questions
Ajax interview questions
Wcf interview questions
Wpf interview questions
.net threading interview questions
.net remoting and webservices interview questions
.net caching interview questions
.net oops interview questions
Sharepoint interview questions
Jquery interview questions
Silverlight interview questions
Linq interview questions
Wwf interview questions
Java interview questions
Sql server interview questions
Ssis interview questions
Ssrs interview questions
Data warehousing interview questions
Data mining interview questions
Oracle interview questions
Php interview questions
Design patterns interview questions
Uml interview questions
Mcpd dumps
Pmp practice tests

This site is best viewed with Internet Explorer 7.0 or higher, Firefox 2.0 or higher, Chrome at a minimum screen resolution of 1024x768.
A complete solution to interview questions
free matrimonial website      
web hosting plans |  compare vps hosting plans |  Compare dedicated hosting plans |  Compare linux hosting plans |  Compare cloud hosting plans |  Compare windows hosting plans | 
Hosting reviews |  GoDaddy reviews | 
Support Wikipedia