FontAwesome fontawesome-webfont.woff2?v = 4.5.0 404 not found

时间:2017-01-16 10:12:54

标签: asp.net-mvc font-awesome

我在我的asp.net mvc项目中使用fontawesome 4.5。我在控制台上面临以下错误 enter image description here

我在字体文件夹中包含了字体

enter image description here

并在layout.cshtml

中排列fontwesome样式表
<link href="~/Content/font-awesome.min.css" rel="stylesheet" />

我的font face属性就像这样

@font-face {
    font-family: 'FontAwesome';
    src: url('../fonts/fontawesome-webfont.eot?v=4.5.0');
    src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

我还在system.webServer

下的web.config文件中添加了静态内容
 <staticContent>
      <remove fileExtension=".woff" />
      <mimeMap fileExtension=".woff" mimeType="application/font-woff" />

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

并在IIS中添加了MIME类型

enter image description here

仍然是错误。需要帮助解决此问题

由于

0 个答案:

没有答案