WebApi Application: Error 404.0, Handler StaticFile


I just tried to deploy a WebApi application on a Windows 2008R2 with IIS 7.0, with IIS Manager untouched until now.

The App runs on our dev server (same Win and IIS version) without hassle. On the deployment server,

  • .NET Framework 4.5 is installed,
  • ASP.NET Feature is installed and
  • Windows authentication is installed

When I call an URL that should map to ASP.NET, the error is

      HTTP Error 404.0

       Module IIS Web Code
 Notification MapRequestHandler
      Handler StaticFile
   Error code 0x80070002
Requested URL http://localhost:80/myapp/api/GetUserConfig
Physical Path C:\inetpub\wwwroot\myapp\api\GetUserConfig
 Logon Method Negotiate
   Logon User ADDOMAIN\Administrator

Handler StaticFile seems important - as far as I can tell, the cause is that ASP.NET does not correctly handle the URL. Where can I start searching for the actual root of this problem?

I should add that multiple other deployments, all in Windows 2012 environments, were successful.

asked on Stack Overflow Sep 30, 2014 by Alexander

4 Answers


Microsoft should definitely put a version at "ASP.NET" Feature in the installer.

WHen you install ASP.NET feature on Windows 2008, this enables ASP.NET 3.5, while I require ASP.NET 4.

So after having installed .NET Framework v4, I would go forward and register ASP.NET 4 with IIS:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319> .\aspnet_regiis.exe -i 



answered on Stack Overflow Oct 16, 2014 by Alexander • edited Nov 6, 2015 by Alexander

I had a similar issue to this using Owin. Clearing Temporary ASP.NET Files fixed it. Hope this helps someone.

answered on Stack Overflow Dec 8, 2014 by randomsolutions

Just had the same behavior in ASP.Net 4.6.2 on IIS 10 (Windows Server 2016) but it worked on IIS 8.5 (Windows Server 2012 R2). The result was http 404.0, Handler: StaticFile. I solved it by adding the ExtensionlessUrl-handler to web.config:

        <remove name="ExtensionlessUrl-Integrated-4.0" />
        <add name="ExtensionlessUrl-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

The name seems to be important! name="ExtensionlessUrl-Integrated-4.0" works but ExtensionlessUrlHandler-Integrated-4.0 just has no effect.

answered on Stack Overflow Dec 5, 2018 by Benjamin Gemperle

User contributions licensed under CC BY-SA 3.0