How to allow download of .json file with ASP.NET

If you want to manually add support to your site, you can just add the following to your web.config in the system.webServer section:

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

This will add a “local” configuration under IIS. This does not work in IIS6, but does work in IIS7 and newer.

Leave a Comment