【问题标题】:Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:5266/Content/fonts/glyphicons-halflings-regular.woff2加载资源失败:服务器响应状态为 404(未找到)http://localhost:5266/Content/fonts/glyphicons-halflings-regular.woff2
【发布时间】:2016-11-20 13:21:35
【问题描述】:

我正在使用引导程序,它工作正常然后突然出现此错误

加载资源失败:服务器响应状态为 404(未找到)http://localhost:5266/Content/fonts/glyphicons-halflings-regular.woff2

<link href="../Content/css/StyleSheet.css" rel="stylesheet" />
<link href="../Content/css/bootstrap.min.css" rel="stylesheet" />
<link href="../Content/css/bootstrap-theme.min.css" rel="stylesheet" />

<script src="../Script/js/jquery-2.2.1.min.js"></script>
<script src="../Script/js/bootstrap.min.js"></script>

请帮帮我。

【问题讨论】:

  • 检查您的控制台是否有错误并发布您的文件夹结构。

标签: html css twitter-bootstrap css-selectors


【解决方案1】:

我知道这个问题是不久前提出的;我评论是为了节省其他人的时间。

该错误可能是因为 web 服务器默认配置无法处理 woff2 的意外文件类型。

在 web.config 文件中添加这个,“配置”标签:

<system.webServer>
    <staticContent>
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
    </staticContent>
</system.webServer>

感谢:Will Strohl

【讨论】:

    【解决方案2】:

    尝试将链接从 ../ 更改为 ./

    您可以参考这个answer,或搜索更多关于文件路径的信息。

    【讨论】:

      猜你喜欢
      • 2023-03-09
      • 2015-07-29
      • 2016-04-08
      • 2015-12-01
      • 2018-08-09
      相关资源
      最近更新 更多