【发布时间】:2016-03-11 02:37:26
【问题描述】:
所以我通过 VS 项目发布了一个网站 -> 发布网站 -> ftp。当我打开它时,我发现一切都不合适了,好像网站根本没有 CSS。我开始查看网站在线和本地版本的 HTML,就在上面我确实注意到了这一点:
在线:
<title>
...
</title><script src="/bundles/modernizr?v=wBEWDufH_8Md-Pbioxomt90vm6tJN2Pyy9u9zHtWsPo1"></script>
<link href="/Content/css?v=0mo0uNbGUFWt4hgQ0AZZm5kcuaVkDkYEBh4UeS1mWi41" rel="stylesheet"/>
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
本地主机:
<title>
...
</title><script src="/Scripts/modernizr-2.6.2.js"></script>
<link href="/Content/bootstrap.css" rel="stylesheet"/>
<link href="/Content/Site.css" rel="stylesheet"/>
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
应该是相同的,但看起来 .NET 将具有相同扩展名的文件合并到一个文件中。到目前为止还好,我想这就是<webopt:bundlereference runat="server" path="~/Content/css" /> 的用途。
但是文件/Content/css?v=0mo0uNbGUFWt4hgQ0AZZm5kcuaVkDkYEBh4UeS1mWi41 甚至没有打开,它返回一个403.14 - Forbidden 错误
错误的原因是什么,我该如何解决?
【问题讨论】:
标签: asp.net .net iis publish http-status-code-403