I am trying to get my script to load in a JSON file which is located in the root of my website:
$.getJSON( "slides.json", function(json) {
var slides = json;
console.log(slides);
}
However, on loading the website I get the following error:
Failed to load resource: the server responded with a status of 404 (Not Found)
So I tried surfing to http://mywebsite/slides.json, and also got a 404. So I tried to change my file extension to slides.txt, and that worked just fine with the surfing, as well as the script reading.
Can somebody explain why my IIS won't distrubute the JSON file as it would a text file?
Thanks :)