0

I am using jQuery ajax to call a serverside asmx service. My client call is looking like this:

$.ajax({
    type: "POST",
    url: "/Products.asmx/GetProducts",
    data: "{'searchString':'" + $("#txtSearch").val() + "'}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function (data) { ListProducts(data, $scope); },
    error: function (data) { HandleError(data); }
});

In most situations it works just perfect. My problem is that in some situations when an error occur i will only receive the error: 'There was an error processing the request'. I would like to get the actual error back to the client. Even in fiddler I can only see the mentioned error message.

Hope someone here can help me.

Prasad Khode
  • 6,602
  • 11
  • 44
  • 59
Axel Andersen
  • 330
  • 4
  • 14
  • I'd try to use a error function with several parameters: Function( jqXHR jqXHR, String textStatus, String errorThrown ). More info http://stackoverflow.com/questions/6792878/jquery-ajax-error-function Good luck! – jyrkim Mar 16 '15 at 08:44

1 Answers1

1

I found the solution. In my web.config I had to add CustomErrors=Off. Now I am receiving the actual error both in my error handling and in fiddler.

Thanks

Axel Andersen
  • 330
  • 4
  • 14