How to specify Exception handler from an App_Code class.

Topics: Exception Handling Application Block
Aug 1, 2007 at 1:51 PM
I am running my ASP .NET 2.0 application as a file system web app. I have created a class in the App_Code directory:
namespace MyApp.ExceptionHandlers
{
ConfigurationElementType(typeof(CustomHandlerData))
public class AppMessageExceptionHandler : IExceptionHandler
{
public AppMessageExceptionHandler(NameValueCollection ignore)
{
}
public Exception HandleException(Exception exception, Guid correlationID)
{
HttpContext.Current.Items"Error" = exception;
return exception;
}
}
}

I would like to configure the Enterprise Library 3.1 to use this class as the handler for the generic Exception. How should I provide the configuration in the web.config? Here the application is not getting compiled into an assembly. In such a case what would be the value for the Assembly attribute in the configuration?

Thanks,
Yash