I am very new to asp.net web api. I am making a simple call with jquery, cross-domain. Everything seems to work properly and when I even check the results I get back, I see that it sends json back to me, but the call fails with the “Uncaught SyntaxError: Unexpected token :” error. I am not sure why its failing, Thanks for any help.
$.ajax({
url: 'http://webapidomain.domain.com/api/Register?firstName=' + firstName + '&lastName=' + lastName + '&' + 'email=' + email + '&password=' + password,
type: 'GET',
dataType: 'jsonp',
contentType: 'application/json',
success: function (result) {
alert(result);
},
complete: function () {
$.mobile.hidePageLoadingMsg();
}
});