Asp.net MVC应用程序中的虚拟目录应用程序
在尝试在当前域中将Screwturn Wiki托管为虚拟目录应用程序时遇到问题.
I am having issues trying to host screwturn wiki as a virtual directory application within my current domain.
该域托管为something.com,而Wiki看起来就像something.com/wiki
the domain is hosted as something.com and the wiki would look like something.com/wiki
当我浏览至something.com/wiki时
when i browse to something.com/wiki I get
无法加载文件或程序集 'System.Web.Mvc,版本= 1.0.0.0, 文化=中立, PublicKeyToken = 31bf3856ad364e35'或 它的依赖项之一.系统 找不到指定的文件.
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?
我还添加了根mvc应用程序
I have also added to the root mvc app
routes.IgnoreRoute("{*path}", new { path = @"wiki\/(.*)" });
这仍然没有解决问题.
找到了解决方案.
感谢Rick Strahls博客 http://www.west-wind. com/Weblog/posts/133041.aspx
Thanks to Rick Strahls blog http://www.west-wind.com/Weblog/posts/133041.aspx
解决方案非常简单.将以下内容添加到您的Web应用程序中
The solution was rather simple. Add the below to your too web application
<location inheritInChildApplications="false">
<system.web>
.........
</system>
</location>
这解决了我的问题.