I've got a Web API web service that accepts a POST request. It works in Chrome, IE10+, but in IE9 it ALWAYS returns 'Error: Access is denied'. I have already read through this post several times, and I tried everything suggested in it, but I continue to get the same access is denied error. I just ran Fiddler on the test machine, and when I attempt to make the service call, IE9 isn't even sending out a request, it's just going right to the error block in the code.
Here's the jquery function that makes the call:
function Login (username, password, appId, org, callback) {
var response = {};
var loginRequest = {
Organization: org,
ApplicationId: appId,
UserName: username,
Password: password
};
$.ajax({
type: 'POST',
url: "theurl",
data: '=' + JSON.stringify(loginRequest),
success: function (data) {
response = {
status: data.status,
info: data.user
};
return callback(response);
},
error: function (error) {
response = {
status: false,
info: error.statusText
};
return callback(response);
}
});
}
I know the data looks a little funky, but it's due to a weird Web API issue that is explained here. I just want to reiterate, this function works fine on all other browsers except IE9. I am already referencing the jquery.xdomainrequest.js file in my html file, but it doesn't solve this issue for me. I've tried specifying the dataType and the contentType in this function, but those cause additional errors.
EDIT: Forgot to mention, this web app is running on a secure (https) port, and the Web API service it is using to login is also running on a secure port, but they are on different machines and different sub-domains (same domain).
I have worked on this for days and I am stumped. Your help is GREATLY appreciated!