If you are reading this post you may face Http Error 500.19 error in your IIS 8.5. And in this article I’ll going to show you what I am doing to resolve this problem. I had simple webapi built by Visual Studio 2013, it work good when I run it from Visual Studio 13 but when I copy the project in IIS it give me this error.

Error Message

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:\inetpub\wwwroot\APITeslin\web.config

Config Source:

<system.webServer> 
  <handlers> 
    <remove name="ExtensionlessUrlHandler-Integrated-4.0" />

How to Solve HTTP Error 500.19 In IIS 8.5

  1. Got to Server manager
  2. Click Add roles and Features
  3. In the roles section choose web server
    1. Under security sub-section choose everything (I excluded digest,  IP restrictions and URL authorization as we don't use them)
    2. Under Application Development choose .NET Extensibility 4.5, ASP>NET 4.5, both ISAPI entries
  4. In the features section choose: NET 3.5, .NET 4.5, ASP.NET 4.5
  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.

Those is step by step how to solve HTTP Error 500.19 - Internal Server Error IIS.