Best Ways For WCF Exception Handling
I am here with a small description of the way of exception handling in WCF. In this article, we will come to learn about: Ways of handling exceptions in WCF. When and what type of exception handling can be used. Exception handling is critical to all applications for troubleshooting the unexpected problems in applications. The Windows Communication Framework (WCF) provides several options for handling exceptions in WCF services. This article discusses these approaches and describes the advantages and disadvantages of each. The following options are provided to handle exceptions in WCF: Using returnUnknownExceptionsAsFaults: Debugging Mode Using FaultException: Best Option . Using IErrorHandler: Only when the exception can't be handled by Fault Exceptions inside a WCF Service Before describing the details of exception handling in WCF, let's explore what happens if we do not handle an exception inside the service. Consider a service with the CreateUser metho...