如何停止的web.config继承 [英] How do I stop web.config inheritance

查看:140
本文介绍了如何停止的web.config继承的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

确定

我有一个ASP.NET的IIS6中的3.5网站的Windows Server 2003(32位)上。

I have a Asp .net 3.5 Website in IIS6 on Windows Server 2003 (32bit).

在一个子虚拟目录Asp.Net 1.1 WebApplication的。 (这是设置为使用旧的1.1 .NET运行库,并配置了它自己的应用程序池。因此,对于所有意图和目的是完全独立的。

with a Asp.Net 1.1 WebApplication in a sub virtual directory. (this is set to use the older 1.1 .net runtime and is configured with it's own App Pool. So for all intents and purposes is completely seperate.

除了它不断在继承根网站的.NET 3.5的web.config。

Except it keeps on inheriting the root website's .net 3.5 web.config.

我已经尝试添加

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

到根网站的web.config,但它似乎并没有工作。

to the root websites web.config but it doesn't seem to work.

奇怪的错误实际上是

<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

这是从与该网站的路径网站.NET 1.1运行报告

/ OLD_WEBAPP但它的呻吟有关网站(如.NET 3.5人的)web.config中以及它如何不理解的类型属性sectionGroup标签。

which is being reported from the .net 1.1 runtime with the website path WEBSITE/OLD_WEBAPP but it's moaning about the webSite (as in the .net 3.5 one's) web.config and how it doesn't understand the type attribute on the sectionGroup tag.

我是什么做错了吗?请告诉我这件事情明显。谢谢

What am I doing wrong? Please tell me it's something obvious. Thanks

推荐答案

只是为了让大家知道,我发现我的服务宗旨,为现在的答案。

Just to let everyone know, I've found an answer that serves my purposes for now.

我最终把所有的配置在.NET 2.0全局Web.config

I ended up putting all the configuration in the .net 2.0 global web.config

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG

我收到此评论这一建议在 connect.microsoft.com

有关ASP.NET 1.1和2.0两种配置的系统阶层式的。仿佛一个不同的框架版本是根网站的子(通常的Inetpub \\ wwwroot)中的结果,则在子配置系统将尝试从根网站合并的配置。这种现象是由于两个1.1和2.0的配置系统向上走的物理目录结构中寻找父母web.configs设计。

The configuration systems for both ASP.NET 1.1 and 2.0 are hierarchichal. As a result if a different framework version is a child of the root website (which is usually inetpub\wwwroot), then the configuration system in the child will attempt to merge the configuration from the root website. This behavior is by design since both the 1.1 and 2.0 configuration systems walk up the physical directory structure looking for parent web.configs.

有一个简单的解决方法是移动
  常见的2.0配置信息
  为根Web.config文件
  2.0框架。根web.config位于:
  C:\\ WINDOWS \\ Microsoft.NET \\框架\\ V2.0.50727 \\ CONFIG。
  用这种方法你所有的2.0
  应用程序将搭载通用
  部分而1.1应用程序将不会
  看到的部分。

A simple workaround is to move the common 2.0 configuration information to the root web.config file for the 2.0 framework. The root web.config is located at: C:\windows\Microsoft.NET\Framework\v2.0.50727\CONFIG. With this approach all of your 2.0 applications will pick up the common sections while 1.1 applications won't see the sections.

感谢您提交这个问题。
  希望以上信息是有用的
  给你的。

Thank you for submitting this issue. Hope the above information is useful for you.

发布由微软在22/02/2008
  17:35

Posted by Microsoft on 22/02/2008 at 17:35

似乎为我工作,虽然它不是很优雅,仿佛那是一个.NET 2.0的应用程序。希望这可以帮助别人。

Seems to work for me, though it's not quite as elegant as if it had been a .net 2.0 application. Hope this helps someone else.

这篇关于如何停止的web.config继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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