We help IT Professionals succeed at work.

"404 - File not found" for Default .aspx on IIS 7.5

Cldela0
Cldela0 asked
on
I am trying to set up a website on my new Windows 7 Home Premium machine.  I created a Virtual Directoy and added Default.aspx to the default documents.  I have a simple default page in the directory.  When I try to navigate to the site from a client pc I get "404 - file or directoy not found"  but it works on the serve pc via localhost.  Also, when I remove default.aspx from the defualt documents and navigate, I see the file listed but get the same error when I click on it.  For some reason I can not get the Default.aspx page to run.  I am sure this is something simple because I have done the same thing on several XP machines and had not problems.
Comment
Watch Question

Commented:
did you check the Security tab in 'Edit permissions ...' of the newly created virtual directory?

Author

Commented:
Do I have to add a specific user?  I don't remember having to do that on my XP Machines.
DevOps Manager
Top Expert 2011
Commented:
Hi,

Things we can try to find out what is happening.

1.  Recreate a new Virtual Host. This may correct your settings if the host was configured before .net was added.

2. In order to configure IIS 7.0 to serve .aspx pages, you must install the ASP.NET feature for IIS 7.0.  To install  ASP.NET, Go to Control Panel/Programs and Features, then select "Turn Windows Features On or Off". Once you're into the Windows Features interface, navigate to Internet Information Services | World Wide Web Services | Application Development Features | ASP.NET and make sure it is checked and click OK.

3. Enable Static and Dynamic Content. Once you're into the Windows Features interface, navigate to Internet Information Services | World Wide Web Services | Common HTTP Features and ensure that "Static Content" is checked.
  * Note that the "static content" service is responsible for serving the Static contents like images, scripts , style
    sheets file, .... Sometimes know for causing 404 errors.

MORE TROUBLESHOOTING If the above fails.

4. Disable IE "Friendly HTTP Error Messages"
Go to “Tools > Internet Options”, choose the Advanced tab, and clear the “Show friendly HTTP error messages” checkbox.  Then, close the browser, open it again, and re-request the page.

5. Detailed error logging
http://learn.iis.net/page.aspx/267/how-to-use-http-detailed-errors-in-iis-70/
Try the following. From IIS Management, selecting your website/application/virtual directory in the left-hand tree view, clicking on the “Error Pages” icon, clicking “Edit Feature Settings” action, and then selecting “Detailed Errors”.

6. Failed Request Tracing
http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis-7/
Requires - Tracing (under World Wide Web Services - Health and Diagnostics - Tracing)

Hope it helps us diagnose further. Let us know.

Cheers,
Hades666

Author

Commented:
Thanks for the help.  It was suggestion 2.  Didn't realize I failed to install the ASP items when I installed IIS.