Generic logging of wcf exceptions

Topics: Exception Handling Application Block, Logging Application Block
Jan 26, 2010 at 5:33 PM


 I am implementing exception handling in my wcfria app which uses Ent Framework 3.5, with ent lib 4.1

 My question is: is it not possible to capture all serverside exceptions and log in one place the exceptions. I have recently implemented transaction logging  and this was done in one place which allows me to put my logging in one place for all entity operations.

Is it not to simply intercept all exceptions in one place (i.e. some exception event i can tap into) , using the app block.

From what I have read I need to put something in every catch statement for any wcf errors, I would like to avoid the overhead if poss and define once.


Jan 27, 2010 at 1:53 AM

Is there any reason why configuring an exception policy/policies and having them use the same trace listener won't work? And you need not put a catch when handling wcf exceptions using EHAB, you only need to put the ExceptionShielding attribute. (Refer here for the example -


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.

Jan 29, 2010 at 3:33 PM

Hi Sarah,

Yes thsi make sense and remembering back this is how I usewd to use the app blocks for .net exceptions.

Thanks v much