Problem


If you are using Website on Microsoft Azure (Currently renamed to Web Apps), you will find the .woff web font is not working in IE, it returns 404.

Based on my experience, this is because IIS is not configured to use the correct MimeType. However, we can not operate the IIS on Azure, there's no RDP into an Azure Web Apps backend machine. How can we do that?

Solution


In fact, after IIS7, the MineType is managed via web.config. So, we only need to add this code into web.config/system.webServer, and IIS can now handle .woff requests.

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

By the way, the easiest way to deploy a hotfix on Azure is to use the Server Explorer to connect to Azure, open your website, find and edit the web.config file, it can be saved directly onto Azure.