Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custome Error Pages

Status
Not open for further replies.

Rhys666

Programmer
May 20, 2003
1,106
OK, an issue I've come across before, but never found a cause for or resolution of, has decided to become the bane of my life again with ASP.Net Custom Error Pages.

Basically, my web application is configured to utilise a custom errors page, in that unhandled exceptions get passed through and the page redirects correctly as per the settings in the web.config file and Global.asax. This works in 95% or so of cases, however...

On occasion, and not in any way I see to be replicable, the custom error handling in ASP.Net/IIS falls over and simply ouputs a standardised error page stating;


Runtime Error
Description An Application error occured on the server. The current custome error settings for this application prevent the details of this application error from being viewed remotely (for security reasons). It could however be viewed by browsers running on the local server machine.
Details To enable the details of this specific error message to be viewable on remote machines please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current application. The <customErrors> tag should then have its "mode" attribute set to "Off".
Notes The current error page you are seeing can be replaced by a custome error page by modifying the "defaultRedirect" attribute of the applications <customErrors> configuration tag to point to a custom error page URL.

Does anyone have any idea's of the cause of this, solutions to it, or workarounds? Even suggestions would do at this point. As I said the application handles pretty much all errors gracefully, redirecting as appropriate and outputting the error details, but that 5% or so of cases where it doesn't is just baffling.

Rhys

""Vampireware /n/, a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."

My Home
 
Basically, my web application is configured to utilise a custom errors page
How are you setting this? Is this in the web.config file?

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Yes, and no. I'm in the process of trying a number of methodologies all of which result in my issue recurring in a small minority of cases.

I've tried having everything configured for custom error pages in Web.Config, in the Application_Error event of the Global.asax and with a mixture of the two. I can get all three methodologies working in 95% or so of cases, but always I return with this issue that on occassion an application error results in that standard error page with the details supplied above. It's almost as if the application itself, or the web.config file of the application, becomes temporarily unavailable.

Rhys

""Vampireware /n/, a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."

My Home
 
Application_Error event of the Global.asax
Well that was going to be my next suggestion! [smile]

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top