June 7, 2013 · windows azure websites JSON windows azure

How to serve static .json files from a Windows Azure Website

If you upload a .json file to your Windows Azure website and try to access it, it would give you a 404 File Not Found error, because the MIME Type of .json is not set by default. This also applies in general to any file that might need a specific MIME Type.

To fix this issue, FTP into your website and upload the following Web.config file which will set the correct MIME types. If you already have a Web.config file in place, just add the below to the appropriate section.

<?xml version="1.0"?>

<mimeMap fileExtension=".json" mimeType="application/json" />

Download Web.config

Note: This post originally appeared on my MSDN blog at http://blogs.msdn.com/b/africaapps/archive/2013/06/07/how-to-serve-static-json-files-from-a-windows-azure-website.aspx

Comments powered by Disqus