asp.net mvc - How to remove error about glyphicons-halflings-regular.woff2 not found -
asp.net mvc4 bootstrap 3 application running microsoft visual studio express 2013 web ide.
chrome console shows error
http://localhost:52216/admin/fonts/glyphicons-halflings-regular.woff2 failed load resource: server responded status of 404 (not found)
this file exists in fonts directory in solution explorer. build action set "content" , copy output directory "do not copy in other font files". bootstrap 3 added solution using nuget. how fix error not occur? application shows glyphicon , fontawesome icons properly. error occurs @ application startup.
this problem happens because iis not know
woff
,woff2
file mime types.
solution 1:
add lines in web.config project:
<system.webserver> ... </modules> <staticcontent> <remove fileextension=".woff" /> <mimemap fileextension=".woff" mimetype="application/x-font-woff" /> <remove fileextension=".woff2" /> <mimemap fileextension=".woff2" mimetype="application/font-woff2" /> </staticcontent>
solution 2:
on iis project page:
step 1: go project iis home page , double click on mime types
button:
step 2: click on add
button actions
menu:
step 3: in middle of screen appears window , in window need add 2 lines solution 1:
Comments
Post a Comment