ASP MVC-捆绑包创建目录路径而不是文件路径 [英] ASP MVC - Bundles creating directory path instead of file path
本文介绍了ASP MVC-捆绑包创建目录路径而不是文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个:
bundles.Add(new StyleBundle("~/Content/Styles/Default").Include("~/Content/Styles/Default/Site.css"));
它创建了这个:
<link href="/Content/Styles/Default?v=HG5hShy6_NaqI7SUDWQuc6zijexRxZooKF4ayIgK5tY1" rel="stylesheet">
现在,我在Web服务器上启用了目录浏览,当我单击该样式路径时,它会将我移动到目录而不是文件!为什么?
Now, i enabled directory browsing on my webserver, and when I click that style path, it moves me to a directory, and not to a file! Why?
更新:我仍然没有解决这个问题,当我在链接http://myserver/Content/Styles/Default?v=HG5hShy6_NaqI7SUDWQuc6zijexRxZooKF4ayIgK5tY1
上访问时,得到的只是文件列表(如ftp)
Update: I still did not manage to solve that question, all i get when i go on the link http://myserver/Content/Styles/Default?v=HG5hShy6_NaqI7SUDWQuc6zijexRxZooKF4ayIgK5tY1
is a list of files (like on a ftp)
推荐答案
查看全文