javascript - Ajax call in different web application -
i've 2 web applications. want make ajax call 1 web application(say application1) web application(say application2).
i'm doing this
var ajax_url = "http://localhost:50224/common/isuseronline"; $.ajax({ url: ajax_url, datatype: "json", type: "post", data: { customerid: '@model.userid' }, success: function (response) { var data = response.data; if (data.isuseronline == false) { $("#isuseractive").val('false'); } else { $("#isuseractive").val('true'); } } }); if ($("#isuseractive").val() == "false") { window.location.href = '@url.action("sessionexpired", "home")'; }
however following error. no 'access-control-allow-origin' header present on requested resource.
there way can make hit application2 , data?
Comments
Post a Comment