Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am getting error (The configuration section system.web.extensions cannot be read because it is missing a section declaration) while installing my Web Application in Server 2008 32 bit machine with .NET Framework 4.0. but it works well in 2008 r2 64 bit machine.

This is my webconfig file info

<configuration>
<runtime>
    <assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <system.web.extensions>
    <scripting>
      <webServices>
        <jsonSerialization maxJsonLength="2147483647"/>
      </webServices>
    </scripting>
  </system.web.extensions>
</configuration>

Any idea to get rid of this error?

Note: I have checked all the related entries in Stack over flow but nothing was useful for me

like image 920
kombsh Avatar asked Nov 19 '13 05:11

kombsh


People also ask

Where is Web config configuration file?

The Web. Config file is used to configure Oracle Web Application functionality. This file is typically installed in the c:\Inetput\wwwroot\WebApp directory.

What is Configsections in web config?

The root Web. config file includes settings that apply to all of the ASP.NET applications that run a specific version of the . NET Framework. Because each ASP.NET application inherits default configuration settings from the root Web.

Where is web config file in Visual Studio?

config file is located in the %SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\ folder. The default settings that are contained in the Machine.


3 Answers

Try changing the application pool run time from .net 2.0 to .net 4.0

like image 103
Praveen Kumar Thalluri Avatar answered Sep 19 '22 23:09

Praveen Kumar Thalluri


The issue resolved for me after adding the following configuration setting in my webconfig file

<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>

We can refer this article for more info: http://www.morgantechspace.com/2013/11/The-configuration-section-system-web-extensions-cannot-be-read-because-it-is-missing-a-section-declaration.html

like image 22
kombsh Avatar answered Sep 19 '22 23:09

kombsh


I also had the same problem after upgrading my OS from Windows Server 2003 to Windows Server 2008 R2 , I just changed the application pool settings to .NetFramework 4.0.0 and also changed the classic to Integrated mode ... my problems solved ..

like image 22
user3946348 Avatar answered Sep 19 '22 23:09

user3946348