IIS website deployment with subdirectories throwing 404 error for pages in subdirectory

10,510

If it's a file extension that IIS doesn't know the mime type for, that can cause 404's.

Try looking in the IIS logs (web site properties->enable logging->browse) for the errors. IIS should call them 404.1 or 404.2 or something like that which will give you more information about what the specific error is.

edit: This is waay late, but that error makes me wonder if you need to go into IIS management->Web Service Extensions (the folder under Web Sites) and Allow ASP.NET. This defaults to Disabled in Win2003.

Share:
10,510
Chris Conway
Author by

Chris Conway

developer looking to get better at what I do

Updated on June 05, 2022

Comments

  • Chris Conway
    Chris Conway almost 2 years

    In IIS 6, I am trying to deploy a Web Site project from Visual Studio 2008. This site has a sub-folder with some aspx pages in it. When I deploy the project to the server and navigate to the site, everything works except for the pages that exist in the sub-folder, they throw a 404 error.

    In IIS, I can navigate the sub-folders and see the pages there, but when I right click on one of the files and select "Browse", that too throws a 404.

    FYI... when I publish the site from VS, I check the box that says "Allow this precompiled site to be updatable". I've tried unchecking the box but it gives me the same result.

    Also, running locally or in debug mode does not produce this result, I can navigate to the pages in sub-folders just fine.

    Edit: A look deeper and it is giving me a 404.2 (404 2 1260) error in IIS Logs which means Lockdown policy prevents this request. Any ideas what this means and how I can resolve it?

  • Chris Conway
    Chris Conway over 15 years
    the page is an .aspx page and the error that is being returned is a 404.2 error.
  • knocte
    knocte about 10 years
    where is "web site properties->enable logging->browse"? I don't find it in IIS 7.5
  • David
    David about 10 years
    This question is about IIS6. In IIS7, logging is under "Logging" when you choose the website in IIS Manager.
  • real_yggdrasil
    real_yggdrasil over 9 years
    I had the same problem while browsing the project on winserv2003 iis6. indeed Webservice Extentions > allow asp.net (framework 4.0 in my case) solved the problem. Thanks for the hint. i would NEVER have found that out by myself.