冲突在IIS 7.5 web.config中混合不同版本的ASP.NET时, [英] Conflict on IIS 7.5 with web.config when mixing different versions of ASP.NET

查看:136
本文介绍了冲突在IIS 7.5 web.config中混合不同版本的ASP.NET时,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设立一个新的网站上运行新的Web服务器IIS 7.5,这是新的我。该部署使用4.0框架的ASP.NET应用程序时,我已经遇到了一个问题。我得到与默认网站相关联的web.config文件冲突的错误消息。在默认网站定义的asp.net应用程序当前正在使用的2.0框架。

我的4.0框架的应用程序被定义为默认的网站下的应用程序。两者都使用不同的应用程序池。

我尝试添加这到我的应用程序4.0配置文件,但它似乎并没有帮助:

 <位置路径=。 inheritInChildApplications =假>

我如何解决这个矛盾的web.config问题?

更新错误消息:

 有一个重复的定义System.Web.Extensions程序/脚本/ scriptResourceHandler部分。对于4.0应用程序的配置文件甚至没有这一部分。默认的网站应用程序确实有这一点。


解决方案

看起来这是一个记录的问题,用的解决方案

从本质上讲,你会被移动configSections信息从父2.0应用程序的web.config中,而是把它变成一个共享2.0特定父的web.config(发现C:\\ WINDOWS \\ Microsoft.NET \\框架\\ V2 .0.50727 \\ CONFIG和/或C:\\ WINDOWS \\ Microsoft.NET \\ Framework64 \\ V2.0.50727 \\ CONFIG),然后使用位置标记来隐藏你的其余配置

I am setting up a new website on new web servers that are running IIS 7.5, which is new to me. I have ran into a problem when deploying an ASP.NET app that is using the 4.0 framework. I get error messages about conflicts with the web.config file associated with the Default Web Site. The asp.net app defined in the default website is using the 2.0 framework currently.

My 4.0 framework app is defined as an application under the default website. Both are using different Application Pools.

I tried adding this to my 4.0 apps config file, but it did not seem to help:

<location path="." inheritInChildApplications="false">

How do I get around this web.config conflict issue?

Update for error message:

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

The config file for the 4.0 app does not even have this section.  The default website app does have this. 

解决方案

Looks like this is a documented problem, with a solution.

Essentially, you will be moving the configSections information out of the parent 2.0 application's web.config, and instead putting it into a shared 2.0 specific parent web.config (found in C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG and/or C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG), and then using the location tag to hide the rest of your configuration.

这篇关于冲突在IIS 7.5 web.config中混合不同版本的ASP.NET时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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