Application_Error Public event not being handled
From: Dirc Khan-Evans (dirc.khan-evans_at_eqos.com)
Date: 03/25/04
- Next message: Steve Drake: "Re: C# syntax"
- Previous message: Jos: "Re: Convert web page to Image"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Mar 2004 11:33:45 -0000
Hi folks.
In my app, I have an application level error handler. This works on several
development machines but once in the production environment, it fails,
reverting to the customErrors setting in the web.config.
I realise that if there are any exceptions thrown by this, then it would
fall through to the customErrors setting in the web.config, so to make sure
this didn't happen, everything has a try/catch block, which would log
everything. Problem is, nothing is logged, ie does not seem to be caught and
I can't see where it could fail.
Has anyone else seen this happening? Any ideas how to solve it?
Structure of error handler:
Application_Error(Object sender, EventArgs e)
{
try
{
Exception lastError = Server.GetLastError().InnerException;
//Generate error message and store in Session, Log the exception
and Server.Transfer to error page which reads the Session ErrorMessage
}
catch(Exception ex)
{
//log any problems
}
}
The only difference between production and development environments is the
fact that we are running Application Centre on production with 3 web
servers. In both environments we are using StateServer for Session
managment... very little session data is stored.
Dirc
- Next message: Steve Drake: "Re: C# syntax"
- Previous message: Jos: "Re: Convert web page to Image"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|