I'm getting a 404 error when trying to load .woff
, .woff2
, and .ttf
files in my MVC 5 application. Following the guidance of this post in which I have the same error, nothing seems to be working for me. Below is the following is what I currently have:
In my web config file
<system.webServer>
...
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="font/x-woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="font/x-woff2" />
<remove fileExtension=".ttf" />
<mimeMap fileExtension=".ttf" mimeType="font/x-ttf" />
</staticContent>
</system.webServer>
In IIS, I did the following steps:
- Under connections, select MIME Types
- Right Click and select "Add..."
- For each file type, File name extension:
.woff
MIME type:font/x-woff
The error happens in both IE 11 and Chrome. Please help on how I can correct this.