Marc
Marc

Reputation: 16512

Browser can't find font when the website is published on azure

I noticed an error after I published on azure.

The browser can't find the font at http://mydummywebsite/Content/KaneLandingPage/assets/elegant-icons/fonts/ElegantIcons.svg

but when I look on the ftp server, the file is there.

ftp://mydummywebsite.ftp.azurewebsites.windows.net/site/wwwroot/Content/KaneLandingPage/assets/elegant-icons/fonts/ElegantIcons.svg

Here is the css

@font-face {
    font-family: 'ElegantIcons';
    src:url(/Content/KaneLandingPage/assets/elegant-icons/fonts/ElegantIcons.eot);
    src:url(/Content/KaneLandingPage/assets/elegant-icons/fonts/ElegantIcons.eot?#iefix) format('embedded-opentype'),
        url(/Content/KaneLandingPage/assets/elegant-icons/fonts/ElegantIcons.ttf) format('truetype'),
        url(/Content/KaneLandingPage/assets/elegant-icons/fonts/ElegantIcons.svg#ElegantIcons) format('svg'),
        url(/Content/KaneLandingPage/assets/elegant-icons/fonts/ElegantIcons.woff) format('woff');
    font-weight: normal;
    font-style: normal;
}

Does anyone know what could be the problem?

Edit:

the ElegantIcons.svg is the only file I can't download from the ftp server.

And I don't have the error in IE because it opens the ElegantIcons.eot. The problem is with Chrome

Upvotes: 0

Views: 723

Answers (1)

dascalos
dascalos

Reputation: 509

I'm guessing IIS doesn't know how to serve the file. You can try adding this to web.config...

<configuration>
   <system.webServer>
      <staticContent>
         <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
      </staticContent>
   </system.webServer>
</configuration>

Upvotes: 2

Related Questions