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.

IIS: HTTP Error 404.17 - Not Found - Static File Handler

Causes

Following are the two cases in which this error may flash on your screen.

  1. The ASP.NET website has inappropriate request handlers defined in IIS.
  1. 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.

  1. Access IIS manager (Go to start – Run – type ‘INETMGR’)
  1. Select the Server Name (System Name)
  1. Select ISAPI and CGI restrictions in right side windowpane.
  1. Change the Not Allowed restrictions to Allow for the required framework.

See the following image, to allow ISAPI and CGI restrictions

IIS: HTTP Error 404.17 - Not Found - Static File Handler

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

IIS: HTTP Error 404.17 - Not Found - Static File Handler

This given example for .NET framework 4.0. You can also use the same command for any version of .NET framework.

  1. Set required .NET version in the application pool.
  1. Enable 32-bit Application in the application pool.
  1. Restart IIS.

You can now try browsing the same website.

Be Sociable, Share!