I am currently working on a project using MVC5 and datatables.js. I've configured data tables to fetch the data using serverside processing via a POST call to my web api. Everything is working great in IE11, Firefox, Chrome, etc. However, when viewing using Microsoft Edge I get a blank table; no data is returned. Using the network tab in the browser I can see that the AJAX call to my web API is never called. I am using the newest version of datatables (1.10.15) I suspect the problem is something like this: Microsoft Edge blocked cross-domain requests sent to IPs in same private network CIDR
My web api controller and view with datatables is part of the same application/project.
Anyone have any ideas?
client side code:
$("#reviewTable").DataTable({
"processing": true,
"serverSide": true,
"info": true,
"stateSave": true,
"sPaginationType": "full_numbers",
"lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
"ajax": {
"url": "@Url.Action("GetReviews","api/Reviews")",
"type": "POST"
},
"columns": [
{ "data": "ReviewName", "orderable": true },
{ "data": "Description", "orderable": true },
{ "data": "Type", "orderable": true },
{ "data": "CreatedDate", "orderable": true }
],
"order": [[0, "asc"]],
"createdRow": function (row, data, dataIndex) {
$(row).attr("data-review-id", data.ID);
}
});