The service I'm trying to call is deployed as part of a visual web part. If i call it directly: _layouts/service.asmx I get the expected service page, showing me the functions I want to call. When I do the Jquery Ajax call (it works just fine on my development server) I get a 500 error back from the server.
$.ajax({
url: 'http://myserver/_layouts/service.asmx/GetLinksToAllFav',
data: "{'tag': '" + $('#MyTag').val() + "', 'TagMaxLength': '" + $('#TagMaxLength').val() + "'}",
type: 'POST',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
$('#MyFav').html(data.d);
$('#MyFav').show(100);
},
error: function (all, textStatus, errorThrown) { console.log(textStatus); console.log(errorThrown); }
});
Response HTTP/1.1 500 Internal Server Error