I’m working on a simple web project for mobile in Microsoft Webmatrix 2.0. For testing purposes, I just want to put a .json file in my project and use that in my javascript code.
Is it possible to set a mime type for different file extensions in Webmatrix? I want my file to response as application/json.
I’ll answer my own question. I used to have my code in a blank project, but in order to serve json data with correct mime type, I had to start a new Razor enabled project. I then added a .cshtml file with the following peiece of code: