I have Internal Server Error in response to an Ajax call. The request is sent from a Visual Web Part, inside a solution, towards an application page :
The application page has this method:
[WebMethod(EnableSession = true)]
[ScriptMethod(UseHttpGet = true)]
public static String Creation()
{
// do something ...
return "{\"status\":\"success\"}";
}
The visual web part makes this JQuery call:
$.ajax({
type: "GET", url: "/_layouts/15/PrenCalendarExchange/Registration.aspx/Creation",
dataType: 'json',
contentType: 'application/json',
data: {
prenSubject: $('#prenSubject').val()
, location: $('#location').val()
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("Error: " + textStatus + " - " + errorThrown);
//INTRNAL SERVER ERROR IS THROWN HERE
}
});
The call works fine in my local environment but fails on a test environment.