【发布时间】:2015-05-24 03:58:55
【问题描述】:
当我将调试版本发布到 Azure 上时...我的所有样式文件都可以访问。
当我将我的发布版本发布到 Azure 上时...我的样式文件都无法访问。
You do not have permission to view this directory or page.
在我的代码中,我有这样的包:
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/Packages/Bootstrap/src/bootstrap.css",
"~/Content/CSS/site.css",
"~/Content/CSS/bootstrap-theme-conflicts.css" ) );
在我看来,我有这个:
@Styles.Render( "~/Content/css" )
我的 Content 文件夹结构是:
已发布应用程序中的结束 url 为:
azurewebsites.net/Content/css/?v=i2nuaUMdmGVopZ-yRx75EKwl3vXByH5xgX4-uk0R9oE1
如果我直接进入文件...即:
azurewebsites.net/Content/CSS/Site.css
他们很好。
有用的资源:
【问题讨论】:
标签: azure asp.net-mvc-5 bundle