VBAHole22 Posted February 27, 2004 Posted February 27, 2004 I am trying to create custom error pages to handle Page Not found errors more gracefully. I have modified my web.config file as such: <customErrors mode="On" defaultRedirect="AppError.aspx"> <error statusCode="404" redirect="NotFound.aspx" /> </customErrors> And I built the two pages that are referred to but I still get that stale 404 page, not my custom page. What am I doing wrong? Do I need to make a change in global.asax also? Quote Wanna-Be C# Superstar
VBAHole22 Posted March 1, 2004 Author Posted March 1, 2004 Oddly enough I can now trap all errors on the page and have it redirect to my custom page EXCEPT 404 page not found errors. Quote Wanna-Be C# Superstar
*Gurus* Derek Stone Posted March 1, 2004 *Gurus* Posted March 1, 2004 Make sure that "NotFound.aspx" actually exists in the current directory. If it does not the runtime will fallback to the default "file not found" error page. Also keep in mind that you will need to prefix the error page's location with a "/" if the application contains subdirectories. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.