2

I am working with bootstrap, it's working fine then suddenly this error appears

Failed to load resource: the server responded with a status of 404 (Not Found) 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>

please help me out.

Mac
  • 21
  • 1
  • 1
  • 3

2 Answers2

2

Try changing your links from ../ to ./.

You can refer on this answer, or search more about file paths.

Community
  • 1
  • 1
Cookie Ninja
  • 1,156
  • 15
  • 29
2

I'm aware this question was asked a while ago; I'm commenting to save others time.

The error is probably because the web server default configuration cannot handle the unexpected file type of woff2.

Add this inside the web.config file, 'configuration' tags:

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

Thanks to: Will Strohl

DaniB
  • 191
  • 2
  • 5
  • 19