In my web app I am making a AJAX call to an asynchronous webmethod that does not return.
Default.aspx has async="True"
The asp script:
$.ajax({
type: "POST",
url: "Default.aspx/Process",
data: params,
contentType: "application/json; charset=utf-8",
success: function (data) {
$("#AjaxDiv").text(data.d);
},
error: function(textStatus, errorThrown) {
$("#AjaxDiv").text(textStatus.responseText);
alert.text(textStatus.responseText);
}
});
On the server, the code is:
[WebMethod]
public static async Task<string> Process(int id)
{
var data = await DataInterface.Call(id);
return data.ToString();
}
However, DataInterface.Call() never returns, although via the debugger, I can see that Call() does complete. What settings or attributes might I be missing? whether it be in the app/web configs or page settings.