Generic operation error handling with OperationInvoker

WCF provides a built-in interface called IErrorHandler for handling exceptions occurring within the WCF service operations processing pipeline. By using the IErrorHandler interface, you can capture those unhandled exceptions during service operation execution and return a customized FaultException object to the client.

However, if you feel IErrorHandler is not flexible or powerful enough, you can consider creating your own generic error-handling component, which can handle the exceptions occurring during the execution of certain WCF operations at the server side. In this recipe, we will demonstrate how to use the IOperationInvoker extension point to implement a custom operation error-handling ...

Get Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.