I have an array collection which store data more than 100.000 records, which need to be pass throw webAPI using JSON, but the is server returning a 500 error. When I pass only a few 100 records, it is working fine.
What is alternative to it or any other way to do it?
Below is the example:
DataGoesHere=[]; //This array has more than 100.000 records
var pageUrl = "/Controller/Method";
                let inputData = {
                    'data': DataGoesHere,
                    'arguments': { arguments list } 
                };
                $.ajax({
                    type: 'POST',
                    contentType: 'application/json; charset=utf-8',
                    url: pageUrl,
                    data: JSON.stringify(inputData),
                    dataType: "json",
                    success: function (msg) {
                    }
                });
After I execute this, API is not calling and firing 500 error.
 
     
    