1
votes

I am having a problem setting up a website under IIS 7. I have created an application and the application pool for the application. Application pool is using .Net Framework 4.0 as my .net app is written in .Net Framework 4.0. Application pool is set to use classic Pipeline Mode. MIME Types have been automatically added to .asp & .aspx.

When I run the website windows explorer is showing me "View Downloads" and trying to download "application name localhost" when it downloads the file I notice that its the html of my default.aspx. I have checked Default Document and it contains Default.aspx.

If I remove .asp & .aspx MIME Types then I get an error: HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler.

4
Probably is no the problem but is worth to check in Server Manager/ Roles that you have installed roles and features for ASP.NET - Oscar Foley
Seems to be a problem with the .NET installation. Try to reinstall .NET 4.0 framework. - Tariqulazam

4 Answers

0
votes

I have seen this problem many times. IIS is not serving aspx pages and most likely is not running for the entire server or that site.

For the entire server: Check to see if iis world wide web service is running.

For the site alone: Hit run inside IIS.

You can easily know if IIS is running properly by going to IIS and hit the browse option from inside a web site.

0
votes

With the data you have put these are the things I would try in order if I were you:

  • Check in Server Manager/ Features if ASP.NET is installed (ServerManager/Roles/Web Server(IIS) look for ASP.NET
  • Check IIS Manager if everything is ok by:
    • Try to browse a test.html file to see if you are able to browse normal
    • Check Basic settings by clicking Test Settings
    • Check Handler Mappings to see if aspx is there.
    • Try to browse a sample test.aspx page with test data.
  • Check Application pool settings.
  • Reinstall Framework 4.0
  • Reboot machine ( a classical)

If you gave us more info and/or the ouput of my proposed tests maybe can help more. Good Luck :)

0
votes

I had the 404.17 error happening on a server today. As you and cad mentioned, I checked the framework of the Application Pool that my site was using to make sure it was set to ASP.Net 4.0, and it was. What happened in my case is that my site was not using the application pool that I thought it was. My site was nested under another site, meaning my site pointed to a subfolder but another site was pointing to the root folder. Even though I had my site set to use the ASP.Net 4.0 Application Pool, the root site used a different Pool that had ASP.Net turned off, it was set to "No managed code". When I set the framework to 4.0 for the Pool the parent site was using, then my site started working.

0
votes

In my case the solution was fixing the Handler mappings as explained here: http://forums.iis.net/post/1943489.aspx

IIS Manager->high-light you web site->click Handler Mappings icon on the home pane->click Revert to Parent... on the right Actions pane