Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.OTF font not being deployed to Azure

Tags:

I have an MVC 4 application with an .otf font in the /images folder. It works on my desktop, but when I deploy to azure I get a 404 when trying to access /images/myfont.otf

The font already has the Build Action property set to 'Content'

How can I force Azure to pick this up?

like image 764
bwbrowning Avatar asked Nov 15 '12 03:11

bwbrowning


2 Answers

You probably need to configure the IIS to properly serve this file type. You do this by adding the following to the <system.webServer> element in Web.config:

<staticContent>     <mimeMap fileExtension=".otf" mimeType="font/otf" /> </staticContent> 

More info http://www.big.info/2013/06/how-to-use-otf-opentype-format-fonts-on.html

like image 111
MEMark Avatar answered Sep 20 '22 18:09

MEMark


Place the following in web.config in the system.webServer configuration:

<system.webServer>        <staticContent>        <remove fileExtension=".otf" />        <mimeMap fileExtension=".otf" mimeType="font/otf" />     </staticContent> </system.webServer> 
like image 27
kyle.stearns Avatar answered Sep 24 '22 18:09

kyle.stearns