Jump to content

404 error and app_theme

- - - - -

  • Please log in to reply
1 reply to this topic

#1
rpmerf

rpmerf

    Newbie

  • Members
  • Pip
  • 2 posts
I am working on debugging a website written in ASP.NET. The site is hosted on Windows 2003 Server on IIS6 using ASP.NET version 2.0.50727. The site has a custom error page for the 404 error. IIS is configured to use this custom error. It seems when there is a 404 error that does not occur in the root directory and doesn't have the type aspx, the theme will not load. It tries to load the theme using your current directory as the root.

examples:
website.com/index.aspx - 404 error works fine
website.com/index.php - 404 error works fine
website.com/images/index.aspx - 404 error works fine
website.com/images/index.php - 404 page loads, but with no theme. It tries to load the theme from website.com/images/App_Themes

In my web.config file
<customErrors defaultRedirect="/ErrorPage.aspx" mode="RemoteOnly">

      <error statusCode="404" redirect="/Error404.aspx"/>
I've tried this with and without the tilde and it makes no difference.

In IIS the custom error is set to URL /Error404.aspx. If I set it to default, the custom error page still works when in the root directory or using the aspx extension, but prints an error otherwise. This leads me to believe that whenever IIS is attempting to load my error page, it does so incorrectly.

What can be causing this problem and how can I fix it?

#2
rpmerf

rpmerf

    Newbie

  • Members
  • Pip
  • 2 posts
I created a file called 404.aspx that redirects to Error404.aspx. I set IIS's 404 error page to 404.aspx and it all works fine now.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users