Soren Dam
  • Blog
  • Contact

Server JSON files on localhost from Visual Studio

August 5, 2014

By Søren Friis Dam

Sometimes you migth get a 404 when trying to server JSON files from localhost. Adding the mime type to the web.config file solves the issue

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

Solution found on Stack Overflow

Leave a Reply Cancel reply

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

  • Contact
  • © 2025 Søren Friis Dam