What Was I Thinking?

Follies & Foils of .NET Development
posts - 95 , comments - 352 , trackbacks - 0

Exception & Fault Handling in WCF

I am considering writing a policy based error handler for WCF.  The Error handler would be registered with the service host, and would automatically log all exceptions.    WCF Services would “opt-in”/register for this error handler by a custom attribute.

Deciding how to handle the unhandled exceptions is the policy part.  The policy could state which exception types to convert to handled WCF faults, which exception types to map to different fault/exception types, which exceptions to obfuscate and which ones to allow to return to the caller (faulting the service channel).

I’m thinking the policy would be handled via configuration, so the rules could be changed without requiring code drops.

The policy-driven approach is similar to the enterprise library exception handling approach, but I think I could deliver 90% of the functionality with sufficiently less effort than is required by the entlib approach.

Would anyone find value in this approach and solution?

Print | posted on Thursday, July 9, 2009 3:12 AM | Filed Under [ Visual Studio ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

Powered by: