I have a controller that returns the following line:
Json(null, JsonRequestBehavior.AllowGet);
This method in the controller is executed by an Ajax request like this:
return new Promise (function(resolve, reject)
{ $.ajax({
type: 'POST',
url: GL_ROOT + "AccountingCompany/DeleteAccountingCompany",
data: JSON.stringify({ id: id }),
dataType: 'json',
contentType: 'application/json; charset=utf-8',
success: function (deleteResult) {
resolve(deleteResult);
}
});
});
When I set a break-point in the success part, it never gets there. But if I changed the result from the controller to Json(-1, JsonRequestBehavior.AllowGet);
it gets to the break-point in the success part of the Ajax request.
Can somebody know the reason why I can not reach the break-point?.