[Solution] HTTP Error 500.19 The requested page cannot be accessed because the related configuration data for the page is invalid

Hi,

I was deploying a web application on a server and I encountered an error when I browsed the website from IIS. The exact error page is given below:

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\My_Website\web.config

Config Source:

41:   <system.webServer>  
42:     <handlers>  
43:       <remove name="ExtensionlessUrlHandler-Integrated-4.0" />

This was the page shown to me on the browser.

Solution:

After some browsing around, I found out that all the features and server roles were not enabled in my server.

Enabling Server roles and features in Windows Server 2012:

  1. Go to Server Manager. Click on Manage on the top-right.
  2. Click Next in the “Before you begin” view.
  3. In the “Installation Type” view, select “Role-based or feature-based installation” and click Next.
  4. In the “Server Selection” view, select the server from the list below and click Next.
  5. In the “Server Roles” view, scroll down, expand “Web Server“, select everything in the “Security” sub-section.
  6. In the “Application Development” section in the same view, I selected the below roles as they were sufficient for my requirement. After selecting the below, click Next.
    1. .NET Extensibility 3.5,
    2. .NET Extensibility 4.5,
    3. ASP.NET 3.5,
    4. ASP.NET 4.5,
    5. ISAPI Extensions,
    6. ISAPI Filters
  7. In the next view (Features), select everything in .NET Framework 3.5 Features and .NET Framework 4.5 Features. Then click Next.
  8. In the Confirmation screen, click “Install“.

This would install all the required features and server roles in the server. After installation has succeeded, close the wizard, reset IIS (optional) and try accessing the application again in the browser. The issue should be resolved and you will be able to access the application.

Hope this helps!!