IIS7 deployment - duplicate #39;system.web.extensions/scripting/scriptResourceHandler#39; section(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"部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:IIS7 部署 - 重复“system.web.extensions/scripting/scriptResourceHandler"部分


- C# 中多线程网络服务器的模式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 输入按键事件处理程序 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01