asp fontawesome 404 (not found)

asp.net-mvc, font-awesome-3.2, iis-7

Solution

When you set debug value to false, it will automatically enable optimisations for the bundles. Instead of having, in your html generated code (by example) :

<link href="/content/bootstrap-3.3.5.min.css" rel="stylesheet"/>
<link href="/content/font-awesome.min.css" rel="stylesheet"/>

You will have something like this :

<link href="/Styles?v=ca92niiBlGWlTNkBwoMTPgQGz9_5Ghi39pZxcx5Dyfk1" rel="stylesheet"/>

This is why your paths are not correct anymore. I think setting absolute paths is a correct way to resolve this problem.

If you don't want to automatically enable optimization when your application is in release mode (`debug="false"`), you can add this line to your file `/App_Start/BundleConfig.cs` :

BundleTable.EnableOptimizations = false;

EDIT : I just seen the date of your question... I came here because I ran into the same issue yesterday. I hope my explanation will help somebody.

Problem

I have this error both on my production IIS7 server and on local iisexpres (after I've set `debug="false"`) ``` GET http://localhost:64231/font/fontawesome-webfont.woff?v=3.2.1 404 (Not Found) jquery-1.11.0.min.js:2 GET http://localhost:64231/font/fontawesome-webfont.ttf?v=3.2.1 404 (Not Found) localhost/:1 GET http://localhost:64231/font/fontawesome-webfont.svg 404 (Not Found) ``` I've added mime types to web.config. Also I've added they to IIS ``` <remove fileExtension=".woff" /> <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" /> <remove fileExtension=".svg" /> <mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> <remove fileExtension=".ttf" /> <mimeMap fileExtension=".ttf" mimeType="application/x-font-ttf" /> ``` What am I doing wrong?

Original source