Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
156
rated 0 times [  158] [ 2]  / answers: 1 / hits: 18772  / 9 Years ago, fri, april 24, 2015, 12:00:00

Bootstrap font not loading correctly
glyphicons-halflings-regular.woff2.




It shows the error in my Chrome-console.



Any solution to get it loaded properly, so that it doesn't show the error in the console?


More From » asp.net-mvc

 Answers
58

Since you put a asp.net-mvc tag on your post, I'm giving you IIS configuration solution for you.



Chrome doesn't consume woff and throws 404 error when your web server isn't configured with MIME type 'woff' or 'woff2'.






You need to add IIS a MIME-TYPE for woff2.
You can configure it in web.xml.



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





And you can also do this through IIS manager.




  1. open IIS manager

  2. Features View -> MIME Types

  3. Actions -> Add

  4. You will see add MIME Type box and put woff2 extension in the file extension .woff2

  5. and MIME type as application/font-woff2 as well.






IIS manager workthrough via images.



enter
enter
enter


[#66917] Wednesday, April 22, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
timothyc

Total Points: 233
Total Questions: 103
Total Answers: 103

Location: Jordan
Member since Thu, Aug 5, 2021
3 Years ago
;