Why woff2, woff and ttf files are not loaded, however they are exist in "assets" folder? Please suggest!
-
1your path seems to be `/css/assets/..` and woff files seems to be in `assets`, may be that is the issue. – Madhu Ranjan Jan 23 '17 at 15:44
-
Thanks Madhu, this is the issue actually. – shazia perween Jan 24 '17 at 04:24
1 Answers
The problem is that those mime types aren't set for your IISExpress instance. Answer originally found here.
Answer 1: This will fix the error for all sites that create that have these file types as a part of their solution and are being run out of IISExpress.
Quoted in part:
Open ApplicationHost.config
located in C:\Users\<user>\Documents\IISExpress\config
Locate staticContent
section and append the following lines before the closing tag:
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
<mimeMap fileExtension=".ttf" mimeType="application/octet-stream />
Answer 1: This will fix the error for that particular site, but any others that you create that have these file types as a part of their solution and are being run out of IISExpress will encounter this same issue.
Update the Web.config
for your project.
Add
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
<mimeMap fileExtension=".ttf" mimeType="application/octet-stream />
in the staticContent
section in system.webServer
in configuration
.
This should get those annoying errors to go away!

- 11,042
- 5
- 48
- 76
-
-
it worked like charm! @indra257create your build and add a web.config at root level with given answer. – Chaitanya Chauhan Jan 12 '18 at 13:29