无法读取配置部分“system.web.extensions",因为它缺少部分声明 [英] The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration

查看:26
本文介绍了无法读取配置部分“system.web.extensions",因为它缺少部分声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

中安装我的 Web 应用程序时出现错误(无法读取配置部分 system.web.extensions,因为它缺少部分声明)带有 .NET Framework 4.0 的 Server 2008 32 位计算机.但它在 2008 r2 64 位机器上运行良好.

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.

这是我的 webconfig 文件信息

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

推荐答案

在我的 webconfig 文件中添加以下配置设置后问题为我解决了

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>

我们可以参考这篇文章了解更多信息:http://www.morgantechspace.com/2013/11/The-configuration-section-system-web-extensions-cannot-be-read-because-it-is-missing-a-section-declaration.html

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

这篇关于无法读取配置部分“system.web.extensions",因为它缺少部分声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆