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

July 21, 2022 / How-to Guide

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 HTTP Error 404.17

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.
  2. Required .NET framework has the restriction in ‘ISAPI and CGI restrictions‘ in IIS.

Possible Solution of HTTP Error 404.17

Following are the steps that may help you to solve the error.

  1. Access IIS manager (Go to start – Run – type ‘INETMGR’)
  2. Select the Server Name (System Name)
  3. Select ISAPI and CGI restrictions in right side windowpane.
  4. Change the Not Allowed restrictions to Allow for the required framework.See the following image, to allow ISAPI and CGI restrictionsIIS: 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 HandlerThis given example for .NET framework 4.0. You can also use the same command for any version of .NET framework.
  6. Set required .NET version in the application pool.
  7. Enable 32-bit Application in the application pool.
  8. Restart IIS.

You can now try browsing the same website.

Need to manage your server settings? Check out How to Configure a Static and Persistent Hostname on Linux

Spread the love