IIS7 部署 - 重复“system.web.extensions/scripting/scriptResourceHandler"部分 [英] IIS7 deployment - duplicate 'system.web.extensions/scripting/scriptResourceHandler' section

查看:27
本文介绍了IIS7 部署 - 重复“system.web.extensions/scripting/scriptResourceHandler"部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在 IIS7 的默认应用程序池上部署 .net 3.5 网站并将框架部分设置为 4.0 时,我收到以下错误.

On attempting to deploy a .net 3.5 website on the default app pool in IIS7 having the framework section set to 4.0, I get the following error.

有一个重复system.web.extensions/scripting/scriptResourceHandler"部分已定义.

There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined.

评论有问题的行也无济于事.关于我需要做什么或看什么的任何指示?

Commenting off the offending lines didn't help either. Any pointers on what I need to do or look at?

推荐答案

如果您的计划是部署到具有在 .net 4.0 中运行的应用程序池的 IIS,您将需要清理包含所有部分的 web.config指向 .net 3.5 的定义.失败的原因是因为这些节定义已经包含在 .NET 4.0 的根 web.config 中(请参阅 %windir%microsoft.netframeworkv4.0.30319configmachine.config),其中包括所有系统.web.extensions 已经声明.

If your plan is to deploy to an IIS that has an Application Pool running in .net 4.0 you will need to cleanup the web.config that includes all the section Definitions that point to .net 3.5. The reason this fails is because these section definitions are already included in the root web.config in .NET 4.0 (see %windir%microsoft.netframeworkv4.0.30319configmachine.config) that include all the system.web.extensions declared already.

另一个快速解决方法是将应用程序池设置为 2.0,就像您的开发机器看起来一样.

Another quick fix is to have the application pool set to 2.0 just as your development machine appears to have,.

这篇关于IIS7 部署 - 重复“system.web.extensions/scripting/scriptResourceHandler"部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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