【发布时间】:2012-06-05 20:35:46
【问题描述】:
我是 Orchard CMS 的新手,目前正在使用它,正在尝试构建新网站。 除此之外,我还有几个测试站点(在 PHP 和静态 html 上)驻留在子目录中的同一托管服务器上,例如“mysite.com/test_site”。 Orchard驻留在根目录,拦截所有请求 访问 PHP 站点时,它只是死于未处理的异常:
Could not load file or assembly 'Orchard.WarmupStarter, Version=1.0.20, Culture=neutral' or one of its dependencies. The system cannot find the file specified.
当试图访问静态 html 站点时,ASP.NET 返回 404:
The resource cannot be found.
我尝试了来自here 的建议解决方案。但是添加位置标签会阻止主站点上的所有 CSS/图像/脚本,因此它看起来像白色背景上的纯文本。 我认为在 Global.asax.cs 中添加忽略路由是个好主意,如下所示:
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("test_site/{*pathInfo}");
}
但是,Orchard 站点中没有 Global.asax.cs。 有什么想法可以在果园中找到路线来尝试这个吗?或任何其他使子目录被忽略并通过请求由 IIS 处理的路径的解决方案。
【问题讨论】:
标签: asp.net-mvc-3 routing subdomain orchardcms subdirectory