今天碰到一个问题,项目中提示的woff2字体文件404找不到,虽然不影响项目,对我这种强迫症简直不能忍,但是路径对应的项目文件是存在的,后来百度了一下,有说要修改iis的 mime映射的,还有说要修改 web.config的,.后来找到一段代码,
这段代码加入web.config以后,错误就消失了,
<system.webServer>
<staticContent>
<remove fileExtension=".woff2"/>
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" />
</staticContent>
</system.webServer>