IIS7部署 - 重复'System.Web.Extensions程序/脚本/ scriptResourceHandler“部分 [英] IIS7 deployment - duplicate 'system.web.extensions/scripting/scriptResourceHandler' section

查看:780
本文介绍了IIS7部署 - 重复'System.Web.Extensions程序/脚本/ 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程序/脚本/ 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.net \\框架\\ v4.0.30319 \\ CONFIG \\ machine.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.net\framework\v4.0.30319\config\machine.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程序/脚本/ scriptResourceHandler“部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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