Search code examples
jqueryiisiis-7.5http-status-code-404same-origin-policy

AJAX not working with web server but working on local filesystem; IIS 7.5


Here is the call:

$.get('js/questionJSON.json', function(data){       

    //erroneous code
},'json');

I can't seem to figure out why the call won't work on the local web server, but will work on the local file system. I was wondering if it had something to do with Same-Origin-Policy.


Solution

  • I figured it out eventually. IIS 7.5 does not come with JSON as a MIME type. After adding JSON as a MIME type it worked fine.