Fix 404 Issues to Load Bootstrap Icons on IIS

2015/01/311 min read
bookmark this
Responsive image

Table of Contents

  1. The Problem
  2. The Solution

Introduction

If you are getting 404 errors on Bootstrap font files in ASP.NET, this post shows how to resolve the issue by adding static content MIME types to your Web.config.

The Problem

If you are getting 404 errors on the following files in ASP.NET, which are font files for Bootstrap, you can try the following way to resolve this issue.

  • glyphicons-halflings-regular.eot
  • glyphicons-halflings-regular.svg
  • glyphicons-halflings-regular.ttf
  • glyphicons-halflings-regular.woff
  • glyphicons-halflings-regular.woff2

The Solution

Add static content MIME types to your Web.config:


adding static content mime type to web.config.











Conclusion

Adding the correct MIME type mappings for Bootstrap font files in your Web.config resolves the 404 errors on IIS. This is a common issue when deploying ASP.NET applications that use Bootstrap's Glyphicons.