Exception handling block error

Topics: Exception Handling Application Block
Jun 22, 2007 at 2:07 PM
I am attempting to utilize the EHAB with my application, but I have hit a hurdle. My configuration file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
<section name="instrumentationConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.Configuration.InstrumentationConfigurationSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
</configSections>
<exceptionHandling>
<exceptionPolicies>
<add name="Application Exception Policy">
<exceptionTypes>
<add type="ADC.Data.AdcDataManagerException, Advertising.Data, Version=1.0.407.5363, Culture=neutral, PublicKeyToken=null"
postHandlingAction="ThrowNewException" name="AdcDataManagerException">
<exceptionHandlers>
<add type="Advertising.Web.PublisherPortal.ExceptionHandling.WppWrapApplicationExceptionHandler, Advertising.Web.PublisherPortal.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
name="Custom Handler" />
</exceptionHandlers>
</add>
</exceptionTypes>
</add>
</exceptionPolicies>
</exceptionHandling>
<instrumentationConfiguration performanceCountersEnabled="false"
eventLoggingEnabled="true" wmiEnabled="false" />
</configuration>

I am trying to test by wrapping a thrown exception thusly:

private void ThrowDataManagerException()
{
try
{
throw new AdcDataManagerException();
}
catch (AdcDataManagerException ex)
{
bool rethrow = ExceptionPolicy.HandleException(ex, "Application Exception Policy");
if (rethrow)
{
throw;
}
}
}

For some reason, when my app runs, I get the following error:

The type Advertising.Web.PublisherPortal.ExceptionHandling.WppWrapApplicationExceptionHandler, Advertising.Web.PublisherPortal.ExceptionHandling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null from configuration could not be created.

Any ideas? Thanks for the help.