• $ cat "

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

    "

    Lately I've been doing a few ASP:NET MVC apps that make use of the very useful Font Awesome font for icons. However, each time I've gotten an anoying 404 error for the woff font file:

    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>