Loading ...

woff, ttf, svg, otf, eot files showing 404 error in console | CodeAsp.Net

woff, ttf, svg, otf, eot files showing 404 error in console

 /5
0 (0votes)

We started using Font Awesome in our application and I noticed for .woff files console was showing 404 error.

I cross checked our application and the .woff files were present at the desired location. 

Reason:

The reason why it was showing 404 error because there was no mime types for the extensions woff, ttf, svg, otf, eot files in IIS

Solution:

The solution was to add the mime types for extensions woff, ttf, svg, otf, eot in IIS7. 

Steps:

  1. Go to IIS server. Click Mime Types.




  2. Click "Add Mime type" and add mime type with "file name extension" and "Mime type"



  3. Repeat the steps for other mime types.

 


You need to add the following mime types:

  1. eot - application/vnd.ms-fontobject
  2. ttf ttc - application/x-font-ttf
  3. otf - font/opentype
  4. woff - application/x-font-woff
  5. svg - image/svg+xml 

 

If you don't have the IIS access, here is the web.config solution:

<system.webServer>
<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>
</system.webServer>

Comments (no comments yet)

Top Posts