Я использую ASP.NET MVC5 и передаю список объектов в действие через ajax.В идеале я хочу пропустить около 10 тыс. Элементов в списке, но по какой-то причине не могу пропустить более 65 элементов.Каждый раз, когда я пытаюсь передать больше 65, я получаю 500 внутренних ошибок сервера.Я попытался отладить с помощью точек останова, но кажется, что вызов никогда не затрагивает мои действия.Код действия:
public ActionResult DownloadExcel(List<DbEntity> list)
{
FileDataViewModel fileData = new FileDataViewModel { FileName = "foo", FilePath = "bar" };
//I want to do something else here but that's not the point of this
return Json(new { fileData });
}
И мой Ajax-вызов:
$('#btn').click(function () {
dto = @Html.Raw(Json.Encode(Model));
console.log(dto);
//I have checked the console and the array is correct, there is no problem with the dto variable
$.ajax({
url: "/DbEntities/DownloadExcel",
contentType: "application/json; charset=utf-8",
method: "POST",
data: JSON.stringify(dto),
})
.done(function (response) {
document.getElementById("mySpan").innerHTML = "<hr>File created successfully<br>";
})
.fail(function (response) {
document.getElementById("error").innerHTML = "Error creating file";
});
});