PROBLEM

I got this issue when I deployed my ASP.NET 4.5 site on IIS 8.0 in Windows. When I hosted a web service project in IIS and browse that, got error with code

HTTP Error 404.17 – Not Found
The requested content appears to be script and will not be served by the static file handler.

This especially obnoxious error occurs when you are trying to run a ASP.NET application in IIS 8. This happens because ASP.Net is not installed correctly for IIS7.

1. On IIS, Click on Application Pools in Application Pools look for the website name you added in IIS.
2. Right click on website and select Advanced Settings

3. Within the "Edit Application Pool" dialog, set the ".NET Framework version" to ".NET Framework v4.0"

4. Right click on Connection Name and then click Refresh
5. Now browse the website