I have webservice up and live. When I make calls to it via jquery using my asp.net application it works fine, but using jquery mobile I get a 500 error message with no results. I am not sure why this is happening. if anyone would have any knowledge of this please let me know. Thanks.
EDIT: I just noticed that my request says Request Method:OPTIONS.
Javascript
var parameter = {
'userName': emailLogin, 'password': passwordLogin
};
parameter = JSON.stringify(parameter);
$.ajax({
type: "POST",
url: "http://myurl.com/MainService.asmx/LoginMobile",
contentType: "application/json; charset=utf-8",
data: parameter,
dataType: "json",
success: function (result) {
if(result.d) {
showErrorDialogMessage('Login error', result.d);
} else {
showErrorDialogMessage('Login error', 'Incorrect email and password combination.');
}
},
error: function (jqXHR, textStatus, errorThrown) {
showErrorDialogMessage('Login error', textStatus);
}
});
I changed datatype to “jsonp” and was able to make the call and retrieve the data base in xml data.