While browsing your ASP.NET website (in IIS 7/7.5/8/8.5) you may have experienced the error –
HTTP Error 404.17 – Not Found.
The requested content appears to be script and will not be served by the static file handler.
Here is the screenshot of the error.
Following are the two cases in which this error may flash on your screen.
- The ASP.NET website has inappropriate request handlers defined in IIS.
- Required .NET framework has the restriction in ‘ISAPI and CGI restrictions‘ in IIS.
Possible Solution #
Following are the steps that may help you to solve the error.
- Access IIS manager (Go to start – Run – type ‘INETMGR’)
- Select the Server Name (System Name)
- Select ISAPI and CGI restrictions in right side windowpane.
- Change the Not Allowed restrictions to Allow for the required framework.
See the following image, to allow ISAPI and CGI restrictions
5. If the necessary framework doesn’t exist in ISAPI and CGI restrictions then you need to re-register framework using the following command.
Go to Start -> Run -> and enter the following command in Run window
C:\Windows\Microsoft.NET\Framework\v4.0.30319 \aspnet_regiis.exe -i
This given example for .NET framework 4.0. You can also use the same command for any version of .NET framework.
- Set required .NET version in the application pool.
- Enable 32-bit Application in the application pool.
- Restart IIS.
You can now try browsing the same website.