gpt4 book ai didi

Asp.net 4.0 子应用程序不能在 IIS 7.5 上运行?

转载 作者:行者123 更新时间:2023-12-02 02:32:53 25 4
gpt4 key购买 nike

我在 IIS 7.5 上配置了一个网站,如下所示。

ParentWebSite
---ChildWebApp
  1. ParentWebSite 是一个 Asp.Net 4.0 网站项目。
  2. ChildWebApp 是一个 Asp.Net 4.0 网络应用程序。

当我访问以下 url 时,它工作正常。

http://ParentWebSite/

当我使用以下 Url 访问 childWebApplication 时。

http://ParentWebSite/ChildWebApp

它给出一个编译错误,显示未找到一个命名空间 (ParentWebSite.BLL)。但是该 namespace 仅在 ParentWebSite 中使用,而在 ChildWebApp 中根本没有引用。

我的问题是为什么我的 ChildWebApp 依赖于 ParentWebSite dll?

当 ChildWebApp 如上所述部署时,当两者都使用自己的应用程序池时,是否独立于 ParentWebSite?

最佳答案

失败的原因可能是在 parentWebSite web.config 中可能引用了模块或处理程序或该命名空间内的类似内容。由于配置继承给子应用程序,因此您的子应用程序试图加载相同的命名空间,但它可能在父级或/app_code/的/bin 目录内的程序集中定义,但它们不在子文件夹中。

因此查看父级的 web.config,看看是否可以找到那里引用的程序集。

如果我是对的,您可以设置 inheritInChildApplications="false"来防止这种继承行为。

关于Asp.net 4.0 子应用程序不能在 IIS 7.5 上运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3087892/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com