FontAwesome does not work for me when I put my app on IIS7 server.
In Firefox the requested URL is encoded to http://l2etest.kema.intra/fonts/fontawesome-webfo
This Answer is not for the above problem But for those who face similar error but due to different reason and land up into this thread.
I faced similar problem but later found that IIS was trying to look for font-awesome woff,eot files in the folder MyIpAddress/fonts/fontawesome-webfont.woof
but I had the files in different folder. Moving the fontawesome-webfont.eot, fontawesome-webfont.svg,fontawesome-webfont.ttf, fontawesome-webfont.woff
into my fonts folder solved my problem
Use this cdn in your index.html page...
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
You can open IIS, point to your website, In IIS session, select MIME Types. After Mime Types view showing, click Add -> In dialog:
click OK.
Done.
I changed from woff2 to woff and it went on fine.
If you're adding FontAwesome via bundling, it can throw out the woff2 url. See the following solution on a similar thread where CssRewriteUrlTransform
is used to rework the url:
https://stackoverflow.com/a/22700610/746984
Playing with IIS sever is risky, instead of that I tried another trick which was 100% success.
Step 1
Rename the font files names by adding .jpg at the end of the files.
fontawesome-webfont.eot.jpg (likewise)
Then Change the File types in fontawesome.css font rendering lines
*/@font-face{font-family:'FontAwesome'; src:url('../fonts/fontawesome-webfont.eot.jpg?v=4.0.3'); src:url('../fonts/fontawesome-webfont.eot.jpg?#iefix&v=4.0.3') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff.jpg?v=4.0.3') format('woff'),url('../fonts/fontawesome-webfont.ttf.jpg?v=4.0.3') format('truetype'),url('../fonts/fontawesome-webfont.svg.jpg?v=4.0.3#fontawesomeregular') format('svg');