How to solve glyphicons-halflings-regular.woff2 Err_Aborted issue in ASP.Net MVC 5

旧街凉风 提交于 2019-12-02 18:43:11

I have downloaded the missing files from here and added those in fonts folder of my project.

Then added these lines within <system.webServer> section in web.config file of my project:

<staticContent>
  <remove fileExtension=".woff" />
  <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
  <remove fileExtension=".woff2" />
  <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>

In your case, download glyphicons-halflings-regular.woff2 file.

As an alternate to Reyan Chougle's answer, this can also be fixed through IIS:

  1. Open IIS, click on your site.

  1. In the middle section, under the grouping IIS, double-click MIME Types

  1. Edit or add woff and/or woff2 extensions:
    • .woff -> application/x-font-woff
    • .woff2 -> application/font-woff2

NOTE: Tested on IIS 8.5 in the Chrome web browser

I was facing the same issue.

In first attempt, I have added the MIME type (font-woff2) directly at the IIS server, it worked. However after deployment(CI/CD) MIME type automatically got removed.

In Second attempt, I have added staticContent tags in web.config and it worked like a permanent fix.

I had a similar issue with WordPress. I had a folder on the root of the directory with a path to the font, and for some reason, I got net::ERR_ABORTED and 404 (Not Found). So what I did was to move those fonts to wp-content/plugins where other fonts were defined such as FontAwesome... and it works!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!