CustomErrors in Web.Config

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Hi All,

I have created a custom error page and updated the web.config file with the
following element.

<customErrors defaultRedirect="Errors/GenericError.aspx" mode="On" />

This appears to work fine for the majority of cases, however if an error is
raised from global.asax the standard error page is displayed in place of my
custom error page.

Anybody know why this is happening ? I check amongst other things login
details in Session_Start and throw an error if the login is invalid, I want
this error to be displayed in my custom error page.

Cheers, Dave.
 
not 100% sure but I believe that the global is parsed before the config is
read it.
 
Back
Top