jQuery deferred AJAX & 500 server errors
问题 Trying to figure out how to debug generic 500 errors from my .ASMX JS: function TestError() { return $.ajax({ type: "POST", url: 'Order.asmx/TestError', contentType: "application/json; charset=utf-8" }); } $.when(TestError()).then(function (err) { console.log(err); }); C# [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public object TestError() { try { throw new Exception("Testing error"); } catch (Exception ex) { return ex; } } Result: It's not even logging the err argument.