Subscribe - It's FREE!!

Stay Connected Here

Stay Updated With Us Here



Google

How to fix 404 Not Found Error for .Woff font in ASP.NET MVC


Share with WhatsApp


This is just a simple fix for the error HTTP 404 Not Found for the font files e.g. woff, woff2 etc. used in ASP.NET or MVC or Azure.

Many designers now days use font awesome which has the .woff within it. So if you have used the same with your website hosted in IIS then you might facing the same issue. 

Every file that gets requested from server must have valid MIME type in the request so if there is a problem with these MIME types you face such errors.

To resolve this issue just open web.config file of your site and add the following content under configuration section.

 <system.webServer>
    <staticContent>
      <remove fileExtension=".woff" />
      <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
    </staticContent>
  </system.webServer>

If you are already having the <system.webServer> defined then just add the innner content.

Hope this simple post have been benefited to you. Thanks.



If you enjoyed this post take 5 seconds to share it! Be Socialable. :-)

Share with WhatsApp

Posts To Read Next

What is Hoisting in JavaScript?

Hoisting in JavaScript, one of the most misunderstood or little understood concept in the JavaScript and remain famous as interview question for JavaScript developers and now also for angular js developer. Lets check out what it means exactly.


Swagger - Powerful Opensource Framework for RESTful API

With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability. Swagger Editor allows you to generate code, documentation with ease.


Visual Studio Code - Lighweight but powerful source code editor available for Windows, OS X and Linux

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, OS X and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (C++, C#, Python, PHP) and runtimes.


How to post JSON string as a string in jQuery AJAX

Know how to post JSON String as string to the action method of controller in MVC.


How to call click or any event only once in jQuery

Know how to execute an click event or any event only once for any element in jQuery. Perform action only once and even not required to unbind event.


Your opinion is valuable for us! Comments, suggetions are welcome.


Submit your Email Id to stay updated with us and get notified with our new posts. It's FREE!
Vu 32'' TV Vu 24'' TV
We know this popup is disturbing you!
But We would greatly appreciate if you share us with your friends below!

It will not take more than 2 seconds but will motivate us greatly to write more,share more!

x