CustomErrors in Web.Config

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.
 
C

Curt_C [MVP]

not 100% sure but I believe that the global is parsed before the config is
read it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,088
Latest member
JeremyMedl

Latest Threads

Top