No WOFF here. Sorry

July 18, 2019
mime 404

You know the file is there, but you keep getting a 404. Call BS!

Because this blog is more like a glorified scratch pad that I won't lose, this is what to do when:

A file you know exists, but you get 404s

Fonts are coming up (see above)

YOu have a new project and you know that you want to support files that your server (IIS) might not know about. (Remember, all files have a mime type that needs to be mapped. This example is for fonts, but could be mp4s or whatevs).


Add this to the web.config:

 

  <system.webServer>

    <staticContent>

      <mimeMap fileExtension="woff" mimeType="application/font-woff" />

      <mimeMap fileExtension="woff2" mimeType="application/font-woff" />

    </staticContent>

  </system.webServer>