I have web api deployed to IIS, it works fine when called via browser like: http:// localhost /api/products response is in XML.
But however when i call it via Ajax it doesn't work. Google Chrome returns the following error:
. origin null is not allowed by Access-Control-Allow-Origin.
$(document).ready(function () {
var url = 'http://localhost/api/products';
$.get(url, function (data) {
$("#test").append(data[5].prod);
});
});
any idea what could be wrong?
Thanks