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?
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
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With