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

Description

   Hi, I got the error The configuration section ‘system.web.extensions’ cannot be read because it is missing a section declaration while installing my ASP.NET Web application in Windows Server 2008 32 Bit machine with .NET Framework 4.0. But when I install this ASP.NET Web Application in 64 Bit operating system it is working fine.

My Web Config file source:

<configuration>
<runtime>
    <assemblybinding appliesto="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentassembly>
        <assemblyidentity name="System.Web.Extensions" publickeytoken="31bf3856ad364e35">
        <bindingredirect newversion="3.5.0.0" oldversion="1.0.0.0-1.1.0.0">
      </bindingredirect></assemblyidentity></dependentassembly>
      <dependentassembly>
        <assemblyidentity name="System.Web.Extensions.Design" publickeytoken="31bf3856ad364e35">
        <bindingredirect newversion="3.5.0.0" oldversion="1.0.0.0-1.1.0.0">
      </bindingredirect></assemblyidentity></dependentassembly>
    </assemblybinding>
  </runtime>
  <system .web.extensions="">
    <scripting>
      <webservices>
        <jsonserialization maxjsonlength="2147483647">
      </jsonserialization></webservices>
    </scripting>
  </system>
</configuration>

I have googled some time to find the solution for the issue The configuration section ‘system.web.extensions’ cannot be read because it is missing a section declaration. many solutions asked me to check the Application Pool version, whether Application Pool uses the 4.0 version or not?.. after I have checked my ApplicationPool, confirmed my application pool is running 4.0 version, so that is not an issue. Then finally I got the following solution.

Solution: The configuration section ‘system.web.extensions’ cannot be read because it is missing a section declaration

After googled some time, the following solution was worked for me.
Yes, I have added the following config setting in my webconfig file that resolved my issue

<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 name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>
  </configSections>

My Resolved Web Config file source:

<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 allowdefinition="MachineToApplication" name="scriptResourceHandler" requirepermission="false" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
        <sectiongroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section allowdefinition="Everywhere" name="jsonSerialization" requirepermission="false" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
        </section></sectiongroup>
      </section></sectiongroup>
    </sectiongroup>
</configsections>
<runtime>
    <assemblybinding appliesto="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentassembly>
        <assemblyidentity name="System.Web.Extensions" publickeytoken="31bf3856ad364e35">
        <bindingredirect newversion="3.5.0.0" oldversion="1.0.0.0-1.1.0.0">
      </bindingredirect></assemblyidentity></dependentassembly>
      <dependentassembly>
        <assemblyidentity name="System.Web.Extensions.Design" publickeytoken="31bf3856ad364e35">
        <bindingredirect newversion="3.5.0.0" oldversion="1.0.0.0-1.1.0.0">
      </bindingredirect></assemblyidentity></dependentassembly>
    </assemblybinding>
  </runtime>
  <system .web.extensions="">
    <scripting>
      <webservices>
        <jsonserialization maxjsonlength="2147483647">
      </jsonserialization></webservices>
    </scripting>
  </system>
</configuration>

Advertisement

3 thoughts on “The configuration section ‘system.web.extensions’ cannot be read because it is missing a section declaration”

Leave a Comment