how do you stop the asp worker processing errors

  • Thread starter Thread starter Henry
  • Start date Start date
H

Henry

Where are the templates for the asp.net error pages stored? I am
catching all errors but sometimes I still get the orange asp error
page.
I looked at machine.config but I didn't see any error handler which I
could overwrite. I don't want my customers to see the aspxerror path
in the URL either.
Does someone know how to replace the error handling in asp.net at the
root? I don't mean the customerrors tag in web.config. That's too late
in the process for me.
Thanks, Henry
 
Hi Henry,

I'm not exactly sure what you're asking, but if you're trying to handle any
unhandled exception, the best method is to add an event delegate for
AppDomain.CurrentDomain.UnhandledException.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
 
Henry said:
Where are the templates for the asp.net error pages stored? I am
catching all errors but sometimes I still get the orange asp error
page.
I looked at machine.config but I didn't see any error handler which I
could overwrite. I don't want my customers to see the aspxerror path
in the URL either.
Does someone know how to replace the error handling in asp.net at the
root? I don't mean the customerrors tag in web.config. That's too late
in the process for me.

Take a look at the <customErrors> element.
 
Hi, you could redirect your user to another page (friendly-PageError)

in your web.config you could do:

<customErrors mode="On" defaultRedirect="AppError.aspx" />

so whenever an unhandled error is created automaticly redirects to
AppError.aspx

Marcos Santos
 
<customErrors mode="On" defaultRedirect="AppError.aspx" />



I played with the custom errors but it always will result to a URL
like this:

AppError.aspx&aspxerrorpath=/ErrorHandling/WebForm1.aspx

asp will always append the error path at the end of my custom error
handler and I don't want this.

There must be a way to catch errors (404,500, ...) before the custom
error handler gets them.

Henry
 
Henry,

You can either use IIS error handling or write an HttpModule to do that.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.

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

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

Back
Top