< system.web.extensions>的问题配置组升级到.NET 4.0 [英] Problem with <system.web.extensions> config group when upgrading to .NET 4.0

查看:259
本文介绍了< system.web.extensions>的问题配置组升级到.NET 4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我们已经从3.5 SP1 - > .NET 4升级了我们的网站。

So we've upgraded our site from 3.5 SP1 -> .NET 4.

当我们运行网站时,我们得到了内部服务器错误(500)说明以下配置组无法读取:

When we ran the site, we got an Internal Server Error (500), stating the following configuration group could not be read:

<system.web.extensions>
        <scripting>
            <scriptResourceHandler enableCompression="true" enableCaching="true" />
            <webServices>
                <jsonSerialization maxJsonLength="999999" />
            </webServices>
        </scripting>
    </system.web.extensions>

我们评论了这一节,网站运行良好(但现在我们正在收到JSON的问题 - 因为以上所需的属性)。

We commented out this section and the website ran fine (but now we are getting problems with JSON - because of the above required property).

我们已经在此问题上阅读了线程,其中大多数都说您的应用程序池没有运行4.0。而且是这样的,所以这不是问题。

We've read threads on this issue, and most of them say "Your application pool is not running 4.0". And it is, so that's not the issue.

我也读过线程,说IIS是以某种方式读取一个旧的machine.config文件。

I've also read threads saying IIS is somehow reading an old machine.config file.

使用.NET 4,您知道web.config的很多部分已被移动到machine.config。

With .NET 4, as you know a lot of the sections of web.config have been moved to machine.config.

所以我们将此部分放回web.config的顶部:

So we put this section back in the top of the web.config:

<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
                </sectionGroup>
            </sectionGroup>
        </sectionGroup>

该网站现在似乎工作正常。

And the website now seems to work ok.

但是,如果这是正确的解决方案,我有点担心。

Still, im a little concerned if this is the correct solution.

任何想法的人?这是正确的修复吗?

Any ideas people? Is this the correct fix?

编辑:

3周,没有答案...死。 =)

3 weeks and no answers...damn. =)

推荐答案

由于我没有任何答案,广泛的搜索结果也没有导致爱,我决定坚持我的原始修复(将system.web.extensions部分添加回web.config)。

As i've had no answers, and extensive googling resulted in no love either, i've decided to stick my original fix (adding the system.web.extensions section back into the web.config).

这篇关于&lt; system.web.extensions&gt;的问题配置组升级到.NET 4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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