Written by

Chanakya Jayabalan

Share

  

Category

see all categories
intranet as a service

ERR_ABORTED while loading Azure apps with custom font files

We have deployed a SharePoint provider hosted app in Azure App Services. The app was using few custom fonts & the font files (.woff extension) were referred in the app. While loading the app page, everything worked well but the font’s weren’t rendered properly. While investigating through developer tools, there were “ERR_ABORTED” error thrown for all the font files loaded. 

Cause & Solution:

When you publish files in Azure, not all file types will be served by default. We may need to specify the file types we need to use explicitly. These are referred as MIME types. A MIME type is a two-part identifier for file formats & it consists of a type, a sub-type and optional parameters. Unless specified explicitly the files will not be served. In few cases you may also get the error “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”
 
So in our case, we were using .woff files for the font. So we added below code snippet in the web.config file of the Web App which solved the issue.
<system.webServer>
    <staticContent>
        <mimeMap fileExtension="woff" mimeType="application/font-woff" />
    </staticContent>
</system.webServer>
Hope you found this article useful. You could also find lot more solutions here http://blog.hubfly.com/tag/solutions
Do let us know if you liked this article and voice out your comments below.
Chanakya Jayabalan

Written by Chanakya Jayabalan

Chanakya holds an MS from BITS, Pilani has over a decade of experience in Microsoft digital platforms both on-premises & on cloud, helping customers in the journey to make their digital transformation possible. His work involves architecting enterprise scale digital platforms & integrations by making right technology choices & solutions.