Azure-hosted web sites and unknown mime types

My kids had some projects they wanted to publish to the web for their elementary school coding club. One was using a tutorial project in Unity, and the other was an RPGMaker project. Both projects built just fine, and would run locally in a browser, but as soon as I hosted them up into an Azure website, neither of them worked properly.

Both Unity and RPGMaker projects were stuck at the ‘loading’ screen.

Looking at the browser console, I could see both project types were getting errors trying to access static .json files. Hmmmm….after a quick search, I noticed lots of existing documentation on the fact that Azure does not play well with unknown MIME types.

Solution: Add custom mime types via web.config – and everything works great.

Note: I had to add a second mime type for .m4a files in order to get the RPGMaker sound files to be served up by Azure.

            <mimeMap fileExtension=".json" mimeType="application/json" />
            <mimeMap fileExtension=".m4a" mimeType="audio/mp4" />


Leave a Reply

Your email address will not be published. Required fields are marked *