HTTP Error 500.19 and error code : 0x80070021

I have a simple webAPI build by Visual Studio 2013. It works well when I run it from VS13 but when I copy the project in local IIS it gives me the following error.

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information:

Module IIS Web Core

Notification BeginRequest

Handler Not yet determined

Error Code 0x80070021

Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

Config File ?C:inetpubwwwrootAPITeslinweb.config

Config Source:

36:   <system.webServer>  
37:     <handlers>  
38:       <remove name="ExtensionlessUrlHandler-Integrated-4.0" />

Got precisely the same error and came to this question. As @SpaceBison mentioned in comments, this answer describes the solution - https://stackoverflow.com/a/12867753/404099. I spotted it too late and it misses some steps. This is what worked for me:

Windows Server 2012, IIS 8.5 . Should work for other versions too.

  • Go to server manager, click add roles and features
  • In the roles section choose: Web Server
  • Under Security sub-section choose everything (I excluded digest, IP restrictions and URL authorization as we don't use them)
  • Under Application Development choose .NET Extensibility 4.5, ASP.NET 4.5 and both ISAPI entries
  • In the features section choose: NET 3.5, .NET 4.5, ASP.NET 4.5
  • In the web server section choose: Web Server (all), Management Tools (IIS Management Console and Management Service), Windows Authentication - if you are using any of it

  • I got this error while trying to host a WCF service in an empty ASP.NET application. The whole solution was using .NET 4.5 platform, on IIS 8.5 running on Windows 8.1. The gotcha was to open up "Turn Windows Features on or off" go to WCF section under ASP.NET 4.5 advanced services and check HTTP Activation. You'll be asked to restart the system. 屏幕截图

    This should Fix the HTTP 500.19!

    EDIT 11-FEB-2016 Just got an issue on Windows 10 Pro, IIS 10, This time, it was an HTTP 404.0. The fix is still the same, turn on "HTTP Activation" under Windows Features -> .NET Framework 4.6 Advanced Services -> WCF Services -> HTTP Activation


    I also was getting the same problem but after brain storming with IIS and google for many hours. I found out the solution. This error is because some settings are disabled in IIS applicationHost.config .

    Below are the steps to solution:

  • Go to C:WindowsSystem32inetsrvconfigapplicationHost.config and open in notepad
  • Change the following key value present in

  • <section name="handlers" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"

  • <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"

  • It worked for me.

    链接地址: http://www.djcxy.com/p/42068.html

    上一篇: 如果package.json被web服务器(IIS)阻止

    下一篇: HTTP错误500.19和错误代码:0x80070021