Arrow icon
Back to Insights

Serve an HTML 5 font file from Azure

April 30, 2013
Arra Derderian

Windows Azure does not have the MIME type for .WOFF files configured in IIS by default. To get around this we can either add a mapping in the web.config under the web server section or add one into IIS via a Windows Azure startup task

The easiest is via the web.config because it is probably faster than writing a Windows Azure startup task to add a static file mapping into IIS 7.0. Secondly, the setting will follow you around to any other machines you run your product on.

First off, add your file into your project and make sure you choose to "Include" it in your project so it is actually included in your published Azure package. Secondly, set the Build Action to "Content" so it is copied into your package at build time.

Lastly. to configure the font to be served by IIS add the following to your web.config :

<system.webServer>  

    <staticContent>

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

   </staticContent>

 </system.webServer>

That's it! Publish and you will not get any more 404 errors on your file.

About the Author:

Arra Derderian serves as the President and as a Lead Technical Architect for Cloud Construct. As a founder at Cloud Construct, Arra is involved in all levels of the business from new project engagements, project planning, and development.

He also serves as the founder of the Boston Orchard CMS User Group and is a member of the Windows Azure Insiders group.

Arra graduated from Northeastern University School with a Bachelor of Science degree in Computer Science.

Author Photo
Arra Derderian
Founder & Chairman
Arrow icon
Back to Insights

Let's talk about your project

Drop us a note
Arrow
Or call us at:  
1.617.903.7604

Let's talk about
your project

Drop us a note
Arrow
Or call us at:
1.617.903.7604

Let's talk about your project

Drop us a note
Arrow
Or call us at:  
1.617.903.7604