Recently our project team developed an application and we intended to host it using an Azure Website, due to its convenience, price and easy of use. It worked well in the local drive and in the local web server..so if we just copy the site to another place it should work, right?
To make short a long story, that's because Azure Websites have a few MIME file types blocked by default and .json is one of them. And for the record, .svg is another one.
Luckily all Azure Websites are really IIS servers running on .Net. If you have some basic knowledge of IIS and .Net you know that we can control these security things via web.config. And that is what you need to do: Place a web.config file that tells IIS to allow the file extension.
To save you the trouble, here's the code to allow json and .svg to be served on Azure Website:
<mimeMap fileExtension=".json" mimeType="application/json" />
Just save this as a web.config and copy to the root folder of your application.
I hope this little trick saved you lots of time!
by Edge Pereira