Font files 404 on Azure Websites, seemingly correct MIME [closed]
Asked Answered
S

1

26

I get WOFF and WOFF2 fonts to work on my IIS Manager 6 localhost, but they give a 404 when I host the site on Azure Websites.

I think I have the correct MIME type in Web.config (tried with and without dots). I see the files when I connect by FTP. I can link to an image that I put in the same folder as the fonts. I have restarted the site on Azure.

Web.config

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

CSS

@font-face {
  font-family: 'Cutive';
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/cutive.woff2) format('woff2'), url(../fonts/cutive.woff) format('woff');
}

I'm out of ideas.. Anyone? Thanks!

Siliculose answered 23/2, 2015 at 20:27 Comment(0)
S
20

Oh for beep's sake.. I put the MIME declarations in the wrong Web.config...

Incorrect: Views/Web.config

Correct: root Web.config

Siliculose answered 23/2, 2015 at 20:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.