Exception Handling in a "Shared Add-In" project

Topics: Exception Handling Application Block
Apr 14, 2008 at 7:14 PM
I've been working on a "Shared Add-In" project (using VB 2005) as an add-in for Microsoft Office 2003 (and likely 2007 in the future), and now that the project is nearly complete, I'm trying to implement the Enterprise Library Exception Handler.

I've used the Exception Handler (Note: I'm familiar with the January 2006 release - version 2.0, I think, but I'm not averse to installing the latest if it will help) in the past with Web applications as well as Win applications.

Unfortunately, I cannot get it working with this "Shared Add-In". I think the problem is that when I run the "Shared Add-In", the calling program isn't my code, but rather one of the applications that it's an add-in for, such as (for example) Microsoft Word. The problem is, the Exception Handler is looking for it's data in the calling application's .config file. But obviously, WINWORD.EXE doesn't have one, and I haven't a way to create one (to my knowledge).

Is there a way to force the Exception Handler to look somewhere else for a config file, such as (for example) an app. config for the Add-in DLL itself?

The specific error I'm getting is "Object reference not set to an instance of an object." when I try to do the ExceptionPolicy.HandleException call. I'm assuming this is because it cannot find the .config file.