This question is locked. New answers and comments are not allowed.
Hi,
We have a problem when we try to call a web service by JQuery ajax method from a Icenium development. We get a 401 (Unauthorized) error when we make the call to the method of the service.
We tried to conect using the asmx service and also with the WCF service, and the same problem is found
We appreciate a lot any help, we are really stack after many tests and many hours googling...
Thanks a lot
Andres & Rodrigo
We have a problem when we try to call a web service by JQuery ajax method from a Icenium development. We get a 401 (Unauthorized) error when we make the call to the method of the service.
Is very strange because the same code is working fine in Chrome or Firefox, but in Graphite simulator or in the device (with Android) only works sometimes, and when it works, is only for a few minutes, then we got the same error again and again, even without making any change.
We are using jsonp to avoid the cross-domain issue, and we also add to the response header Access-Control-Allow-Origin = "*" for cross-origin problems.
We tried to conect using the asmx service and also with the WCF service, and the same problem is found
Here is the code:
function testjsonp() {
$.ajax({
data: { email: JSON.stringify('anemail@aa.com'), password: JSON.stringify('password')},
dataType: "jsonp",
type: "GET",
contentType: "application/json; charset=utf-8",
async: false,
success: function (data) {
alert(data.d);
},
error: function (data) {
$('#div_error').html(data.responseText);
}
});
}
We appreciate a lot any help, we are really stack after many tests and many hours googling...
Thanks a lot
Andres & Rodrigo