The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration.

 


This article explains why this error occurs and how to resolve it effectively.

Understanding the Problem
IIS reads your application's web.config file to apply runtime configurations. When IIS encounters the <system.web.extensions> section but can't find its declaration in the <configSections> block, it throws the 500.19 error.

In short:
IIS doesn't know how to parse <system.web.extensions> without its proper declaration.

Common Causes

  • Incorrect or missing <configSections> block in web.config.
  • ASP.NET 4.x not installed or registered with IIS.
  • IIS not configured to support ASP.NET extensions.

Solution Steps
Ensure IIS Supports ASP.NET 4.x


Go to:
    Control Panel → Programs and Features → Turn Windows Features On or Off.

Under Internet Information Services → World Wide Web Services → Application Development Features, ensure:
    ✅ ASP.NET 4.x
    ✅ .NET Extensibility 4.x
    ✅ ISAPI Extensions
    ✅ ISAPI Filters

If missing, enable these options and restart IIS.

Alternatively, run via Command Prompt:
dism /online /enable-feature /featurename:IIS-ASPNET45 /all
iisreset


Correct Your web.config File
At the top of your web.config file, add the following <configSections> block before any use of <system.web.extensions>:
<configuration>
<configSections>
<sectionGroup name="system.web.extensions"
              type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  <sectionGroup name="scripting"
                type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    <section name="scriptResourceHandler"
             type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
             requirePermission="false" allowDefinition="MachineToApplication"/>
  </sectionGroup>
</sectionGroup>
</configSections>


Then, include your <system.web.extensions> section like this:
<system.web.extensions>
<scripting>
<webServices>
  <!-- Custom settings here -->
</webServices>
</scripting>
</system.web.extensions>

Finally, complete your web.config with typical sections like <system.web>, <appSettings>, etc.

Restart IIS
After saving changes to web.config, restart IIS:
iisreset

Example Working web.config
<?xml version="1.0"?>
<configuration>

<configSections>
<!-- Required declaration -->
</configSections>

<system.web.extensions>
<scripting>
  <webServices>
    <!-- Your configuration -->
  </webServices>
</scripting>
</system.web.extensions>

<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>

</configuration>

Important Note: ASP.NET Core Apps
If your project is ASP.NET Core, you should not use <system.web.extensions> or related configuration. Core apps rely on appsettings.json and middleware pipelines.

Conclusion
The HTTP Error 500.19 due to 'system.web.extensions' cannot be read is typically caused by:

  • Missing ASP.NET support in IIS.
  • Incorrect web.config structure.

By installing necessary IIS features and correctly declaring your configuration sections, you can resolve this issue and deploy your application successfully.