.NET 4.0继承.NET 3.5的web.config? [英] .net 4.0 inheriting .net 3.5 web.config?

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

问题描述

我在IIS 6,我创建了一个虚拟目录来承载一个.NET 4.0的应用程序的.NET 3.5网站。但是,我越来越指向从父应用程序的Web.config文件中的.NET 4.0应用程序处理项目各种错误,即使我有它设置为它自己的虚拟目录。

I have a .NET 3.5 web site in IIS 6. I created a virtual directory to host a .NET 4.0 app. However, I'm getting all kinds of errors that point to the .NET 4.0 app processing items from the parent app's web.config file, even though I have it set up to be its own virtual directory.

我怎样才能阻止这种情况发生?

How can I stop this from happening?

推荐答案

这可能会帮助你 - 虽然它解释了什么是在相反的情况做

This may help you - although it explains what to do in the opposite situation.

<一个href=\"http://stackoverflow.com/questions/3469732/can-i-host-a-net-2-0-virtual-directory-in-asp-net-4-0-site/3469892#3469892\">http://stackoverflow.com/questions/3469732/can-i-host-a-net-2-0-virtual-directory-in-asp-net-4-0-site/3469892#3469892

虚拟目录将继承根目录下的web.config。这是由设计。

Virtual directories will inherit the root directory web.config. This is by design.

或者,您可以使用&LT;删除/方式&gt; 元素,那么,从父配置删除元素

Or, you can use the <remove /> element to, well, remove elements from the parent config.

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

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