nerdexam
Microsoft

70-513 · Question #46

You are developing a client application that consumes a Windows Communication Foundation (WCF) service. The operation contract is as follows. [OperationContract] [FaultContract(typeof(SalesFault))]…

The correct answer is B. FaultException. See the full explanation below for the reasoning.

Question

You are developing a client application that consumes a Windows Communication Foundation (WCF) service. The operation contract is as follows. [OperationContract] [FaultContract(typeof(SalesFault))] string GetSales(string saleId); The service configuration file contains the following line in the serviceBehaviors section. <behavior> <serviceDebug includeExceptionDetailInFaults="True"/> </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?

Options

  • ATimeoutException
  • BFaultException
  • CDivideByZeroException
  • DFaultException<SalesFault>

How the community answered

(57 responses)
  • A
    12% (7)
  • B
    81% (46)
  • C
    5% (3)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice