Asp.net MVC 应用程序中的虚拟目录应用程序

发布于 2024-08-23 07:42:01 字数 462 浏览 4 评论 0原文

我在尝试将 Screwturn wiki 作为当前域中的虚拟目录应用程序托管时遇到问题。

该域名托管为something.com,

当我浏览到something.com/wiki时,

wiki看起来像something.com/wiki

无法加载文件或程序集 'System.Web.Mvc,版本=1.0.0.0, 文化=中立, PublicKeyToken=31bf3856ad364e35' 或 它的依赖项之一。系统 找不到指定的文件。

为什么虚拟目录会回退到根应用程序。难道不应该是它自己的应用程序边界吗?

我也添加到根mvc应用程序

routes.IgnoreRoute("{*path}", new { path = @"wiki\/(.*)" });

这仍然没有解决问题。

I am having issues trying to host screwturn wiki as a virtual directory application within my current domain.

the domain is hosted as something.com and the wiki would look like something.com/wiki

when i browse to something.com/wiki I get

Could not load file or assembly
'System.Web.Mvc, Version=1.0.0.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or
one of its dependencies. The system
cannot find the file specified.

Why is the virtual directory falling back to the root application. Shouldn't it be its own application boundary?

I have also added to the root mvc app

routes.IgnoreRoute("{*path}", new { path = @"wiki\/(.*)" });

This still has not solved the problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开半夏魅人心 2024-08-30 07:42:01

找到了解决方案。

感谢 Rick Strahls 博客 http://www.west-wind.com/Weblog /posts/133041.aspx

解决方案相当简单。将以下内容添加到您的网络应用程序中

<location inheritInChildApplications="false">
    <system.web>   
    .........
    </system>
</location>

这解决了我的问题。

Found the solution.

Thanks to Rick Strahls blog http://www.west-wind.com/Weblog/posts/133041.aspx

The solution was rather simple. Add the below to your too web application

<location inheritInChildApplications="false">
    <system.web>   
    .........
    </system>
</location>

This solved my problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文