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

标签 iis-6 asp.net-mvc-routing virtual-directory screwturn

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

域托管为 something.com,wiki 看起来像 something.com/wiki

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

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.

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

我还添加了根mvc应用

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

这还是没有解决问题。

最佳答案

找到解决方案。

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

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

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

这解决了我的问题。

关于iis-6 - Asp.net MVC 应用程序中的虚拟目录应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2375588/

相关文章:

asp.net - 如何配置 IIS Express 来调试子目录中的应用程序?

asp.net - 如何在IIS 6.1中将IE设置为默认浏览器?

VS2008 和 IIS6 之间的 C# 转换不同

c# - 在 ASP.NET IIS 托管的 WCF 应用程序中偶尔调用需要 5 秒

asp.net-mvc - 从mvc url中隐藏一个 Controller 名称,显示其他 Controller 名称

asp.net-mvc - ASP.NET MVC : Empty ActionLinks appearing

c# - MVC 路由与部分类

iis-6 - 为什么我的 IIS 虚拟目录可以使用 http ://localhost but not http://computername?

c# - 应用程序可以在不传递 Application_End 或 Application_Error 的情况下返回 "die"吗?

.net - IIS API-创建虚拟目录?