How to use custom handler under Exception handling Application Block

Feb 11, 2009 at 5:42 AM
Edited Feb 11, 2009 at 5:43 AM
Hi,

I am using EntLib 4.1, currently exploring Exception Handling application block.
I am able to use logging handler, replace handler but i am facing difficulty in using custom handler.
I didnt find any tutorial regarding custom handler.
I am able to add Attributes but facing issues in declaring type.
It would be helpful to me if you explain in details how to use this handler and benefits of using the same.

Rupanshu
Feb 11, 2009 at 7:17 AM
Hi,

What specific problem are you facing in declaring type? Anyway, the links below might give you a bit of an explanation. Also, you can take a look at the Exception handling quickstart it has a sample custom exception handler. One last thing, This custom exception handler can be used if you want to handle exception in a manner that is not available to the builtin exception handlers. One example is, if you want to display the HandlingInstanceId.

http://blogs.microsoft.co.il/blogs/kolbis/archive/2007/08/07/Creating-a-custom-exception-handler.aspx
http://msdn.microsoft.com/en-us/library/dd140058.aspx


Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com
Feb 12, 2009 at 10:00 AM
Thanks for the reply
Problem is i am not able to load the assembly in the type selector. I am getting following error:
"Unable to load references for the specified assembly, please ensure all references are in the same directory as the assembly which is loaded."
Feb 12, 2009 at 11:09 AM
You might be encountering this issue - http://www.codeplex.com/entlib/WorkItem/View.aspx?WorkItemId=20410
The workaround is also described.


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Feb 12, 2009 at 1:32 PM
Hi Sarah,

After going through teh suggested links my understanding is this issue is one of the cons of Enterprise library. EntLib team is still working on this issue.

Please suggest if my understanding is correct.

Rupanshu

Feb 12, 2009 at 1:52 PM
"one of the cons of Enterprise Library" - might be an overstatement :) as this is not an issue in the previous versions, just in the latest (v4.1) one. 



Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com