I have an MVC app that I've developed with an Azure AD login. I'm using ajax to call a function in my controller that writes to a database, however, I'm getting this error thrown:
https://login.microsoftonline.com/{XXX}.onmicrosoft.com/wsfed?w…%3d0%26id%3dpassive%26ru%3d%252fHome%252fpost&wct=2016-11-04T19%3a37%3a05Z. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://mysite.mysite.ca' is therefore not allowed access.
here's the ajax call that's throwing the error:
$.ajax({
type: "POST",
url: "Home/post",
data: item,
dataType: "json"
success: KPR.showNewApp(item),
error: function (xhr, ajaxOptions, thrownError) {
console.log(xhr);
console.log(thrownError);
}
});