使用ASP.Net错误的web.config文件的虚拟目录 [英] ASP.Net using wrong web.config for virtual directory

查看:179
本文介绍了使用ASP.Net错误的web.config文件的虚拟目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在Windows Server 2003上运行IIS 6 R2。

We're running IIS 6 on Windows Server 2003 R2.

我们想补充一点,.NET 4.0下运行到.NET 2.0下运行的网站的虚拟目录。我们给出的虚拟目录了自己的应用程序池,我们已经配置了虚拟目录下4.0上运行。

We want to add a virtual directory that runs under .NET 4.0 to a site that runs under .NET 2.0. We've given the virtual directory its own app pool, and we've configured the virtual directory to run under 4.0.

父站点工作正常,但虚拟目录抛出引用父站点的web.config文件中的错误。我们需要虚拟目录使用它自己的web.config文件。

The parent site works fine, but the virtual directory throws errors that reference the parent site's web.config file. We need the virtual directory to use its own web.config file.

在IIS管理器的GUI说,虚拟目录使用它自己的web.config文件,但我们得到的错误信息是指在父母的web.config文件的项目。

The GUI in the IIS Manager says that the virtual directory is using its own web.config file, but the error messages we get refer to items in the parent's web.config file.

我不知道如何解决这个问题。我最好的铅到目前为止,从其他网站上一个帖子说,这个问题可以用像这样解决的:

I'm not sure how to solve the problem. My best lead so far is from a post on another site said that the problem could be solved with something like this:

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

此外,我不知道这会解决的事情,我不知道如何找出哪里把它或它应该包含的内容。父网站是建立在一个CMS系统之上,它的web.config文件是相当复杂的。

Again, I'm not sure this will fix things, and I'm not sure how to figure out where to put it or what it ought to contain. The parent site is built on top of a CMS system, and its web.config file is reasonably complex.

谢谢

推荐答案

我得到这个工作,所以我想离开下一个人的答案。

I got this to work, so I want to leave the answer for the next person.

位置标记我在我的问题提到做的工作。我让他们用他们包围的System.Web部分工作:

The location tags I mentioned in my question did the job. I got them to work by using them to enclose a system.web section:

<location path="." inheritInChildApplications="false">
  <system.web>
    .
    .
   (the stuff that made the site in the virtual directory break)
    .
    .
  </system.web>
 </location>

谢谢

这篇关于使用ASP.Net错误的web.config文件的虚拟目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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