belmer
2/2/2014 - 8:37 AM

Fixing the Font Awesome WOFF 404 Error under ASP.NET MVC

Fixing the Font Awesome WOFF 404 Error under ASP.NET MVC

The solution for this is to add the following segment to the WebServer section of your web.config:

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

This configures IIS to understand that there is a woff mime type that it should care about, which magically makes the 404 go away.

If you get a 500 Internal Server Error due to there already being a mime map for .woff you can add a remove tab before adding the new mimeMap, like so:

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