我只把我的资源档案(javascript, css, pornography)从Content
翻到习惯Assets
。 我已注意到一种奇怪的行为,即这些档案不再由浏览器和。 显示对<条码>Asets中每一资源的单独请求:
我知道,伙伴关系需要的是<代码>Content。 NET MVC公约,但为什么会发生? Is Content
, 尤其由任何人(例如:ASP)来对待。 NET, IISExpress等? 如何对含有静态资源的其他夹子进行 force击?
EDIT: Oh, it appears to be not an ASP.NET MVC odd behavior, but just the standard behavior of MvcMiniProfiler. Currently I m checking that...
EDIT: Yea, there is no problem with ASP.NET MVC, it s just a default configuration of MvcMiniProfiler to ignore only these paths: "/mini-profiler-", "/content/", "/scripts/", "/favicon.ico"
. And these defaults can be easily extended:
MiniProfiler.Settings.IgnoredPaths = MiniProfiler.Settings.IgnoredPaths
.Concat(new [] { "/assets/" })
.ToArray();
有时,在使用某种东西之前阅读文件是一种好的想法;