I used to export data as excel files on server side, now I am trying to do it by using webservices.
[WebMethod(EnableSession = true)]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public void exportProduct(parameters)
{
// ... other code ...
ExportToExcel(ds.Tables[0], filename);
}
public static void ExportToExcel(object x, string filename)
{
// ... other code ...
}
But I am getting this error:
Thread was being aborted
However, everything works just fine when I try this URL:
http://localhost:37407/WebServices/WebServiceProduct.asmx?op=exportProduct
Something must be wrong between client-side and the webservice, but I couldn't find it.
Here's the client-side code. I have been just calling webservice but that's all.
function exportToExcel() {
webService._staticInstance.exportProduct(orderby, filter, function() {
});
}