Reputation: 31
I am trying to perform this AJAX post but for some reason I am getting a server 500 error.
$.ajax({
url: '.../PublicAPI.svc/Register',
type: 'POST',
dataType: 'json',
async: false,
//contentType: 'application/json; charset=utf-8',
data: '{ "ApiKey": "'+$('#ApiKey').val()+'", "LanguageId": "'+$('#LanguageId').val()+'", "Password": "'+$('#Password').val()+'","Username": "'+$('#Email').val()+'" }',
success: function( response, textStatus, jqXHR ) {
console.log('success');
console.log(response);
},
error: function( jqXHR, textStatus, errorThrown ) {
console.log(jqXHR);
console.log(textStatus);
console.log(errorThrown);
}
});
Can any body help me to find out what is the issue?
Upvotes: 1
Views: 3160
Reputation: 4736
You are using three dots in your AJAX URL. Try using 2 dots, and the server error should go away.
url: '../PublicAPI.svc/Register',
See Three or more dots followed by a slash in url causes an internal server error
Upvotes: 2