我想用ie7-js库让我的浏览器少于ie9认为他们是ie9。该库在这里举行:为什么ie7-js从我的应用程序请求CSS文件?
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