A typical scenario goes like you have been using the Angular UI Grid in your local server. All the images in the grid were looking good (including the down & up arrows etc..). You published your web application to Azure and suddenly instead of the down & up arrows you get some text similar to Chinese fonts.
When you open up the developer console in the web browser, you get a 404 file not found error for ui-grid.woff.
The reason behind is that Azure does not have MIME types configured for several font file formats. Whereas, if you check on your local IIS the MIME file types are already configured
So the below entry must be added to web.config to include the mime types. If not Azure will simply return a 404 error even though the files are actually published to Azure.
<system.webServer>
<staticContent>
<mimeMap fileExtension="woff" mimeType="application/font-woff" />
</staticContent>
</system.webServer>
When you open up the developer console in the web browser, you get a 404 file not found error for ui-grid.woff.
The reason behind is that Azure does not have MIME types configured for several font file formats. Whereas, if you check on your local IIS the MIME file types are already configured
So the below entry must be added to web.config to include the mime types. If not Azure will simply return a 404 error even though the files are actually published to Azure.
<system.webServer>
<staticContent>
<mimeMap fileExtension="woff" mimeType="application/font-woff" />
</staticContent>
</system.webServer>
good post. I came across the same problem. thanks !
ReplyDelete