【发布时间】:2010-09-21 16:47:15
【问题描述】:
我正在尝试使用 ie7-js 库让我的浏览器低于 ie9 认为它们是 ie9。该库托管在这里:
http://code.google.com/p/ie7-js/
我在我的母版页中引用它如下:
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
自从我介绍了这个文件,我的 StructureMap 控制器工厂 - 在这里定义:
public class StructureMapControllerFactory : DefaultControllerFactory
{
protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
{
try
{
if (controllerType == null) return base.GetControllerInstance(requestContext, controllerType);
return ObjectFactory.GetInstance(controllerType) as IController;
}
catch (System.Exception xpt)
{
// The controller for path '/WSOD-layout-page.css' was not found or does not implement IController.
// The controller for path '/layout-header.css' was not found or does not implement IController.
// The controller for path '/layout-content.css' was not found or does not implement IController.
// The controller for path '/component-leaderboard.css' was not found or does not implement IController.
// etc...
}
}
}
遇到以下错误:
System.Web.HttpException: The controller for path '/component-page-title.css' was not found or does not implement IController.
但不仅如此 - 我引用的每个 css 文件都会出现类似的错误。为什么会这样?
为了澄清,这些 CSS 文件托管在与我正在处理的域不同的域中。这会是问题吗?
为什么 CSS 请求会被路由到我的应用程序?我想知道这是否可以防止/解决?
更新:
我已将此作为错误提交给开发人员。错误报告在这里:http://code.google.com/p/ie7-js/issues/detail?id=284
【问题讨论】:
标签: c# asp.net-mvc ie7.js