如何解决ASP.Net MVC 5中的glyphicons-halflings-regular.woff2 Err_Aborted问题 [英] How to solve glyphicons-halflings-regular.woff2 Err_Aborted issue in ASP.Net MVC 5
问题描述
因此,我有一个项目,我想更改BootStrap的主题.因此,我从 BootSwatch 中获取了主题,并且选择的主题是
So I have a project where I want to change the theme of BootStrap. So, I took theme from BootSwatch and the theme is selected is Lumen. Now in my Bundle.Config file, I made below changes.
bundles.Add(new StyleBundle("~/Content/css").Include(
//"~/Content/bootstrap.css",
"~/Content/bootstrap-lumen.css",
"~/Content/superslides.css",
"~/Content/site.css"));
}
现在,一旦我开始使用流明主题,就会出现如下错误(在开发工具中):
Now as soon as I start using the Lumen Theme, I get error (in dev tool) as below:
P.S:当我使用常规BootStrap 主题时,不会发生 .我调查了 SO答案.但是,它谈到了对IIS进行的所有更改.但是当我使用 LUMEN 主题时,我的问题仅会发生.如何摆脱这个问题?
P.S: This does not happen when I use normal BootStrap theme. I looked into SO Answer. But it talks about making IIS changes and all. But my problem only occurs when I use LUMEN theme. How to get rid of this issue?
推荐答案
我从此处,并将其添加到我项目的fonts
文件夹中.
I have downloaded the missing files from here and added those in fonts
folder of my project.
然后将这些行添加到我项目的web.config
文件的<system.webServer>
部分中:
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>
以您为例,下载 glyphicons-halflings -regular.woff2 文件.
这篇关于如何解决ASP.Net MVC 5中的glyphicons-halflings-regular.woff2 Err_Aborted问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!