Skip to content

Instantly share code, notes, and snippets.

@belmer
Last active August 4, 2016 03:13
Show Gist options
  • Save belmer/8764833 to your computer and use it in GitHub Desktop.
Save belmer/8764833 to your computer and use it in GitHub Desktop.
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>
@darkmakukudo
Copy link

This is not working for me. All of my assets now got a 404 error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment