0

I'm trying to send a large stringfy'ed JSON list array to a C# function using AngularJS

POST:

$http(
     {
          method: "POST",
          url: "/Home/IntegrityCheck",
          dataType: 'json',
          data: { bulkUpdateList: JSON.stringify(bulkUpdate) },
          headers: { "Content-Type": "application/json" }
      }).then(function (result) {

JSON example:

[{"ApplicationNo":"WHD00004925","field":"Decision","newValue":"Approved","idUser":"1"},
{"ApplicationNo":"WHD00005030","field":"AccountNumber","newValue":"100070","idUser":"1"}]

This works for up-to ~15,000 rows, but anything over and it instantly gives the following in the browser console...

angular.js:12845 POST http://localhost:50869/Home/IntegrityCheck 500 (Internal Server Error)

The C# function is never hit when the array is over a certain size (I've not been able to pin down the exact size it fails at, but is around 16,000+) the post will need to handle arrays of a max length of 450,000 rows.

My understanding is the max string I could send via post is something like 2 billion characters or 2GB in size, neither of which I'm getting remotely close to. I don't seem to have anything in my webconfig which would limit post messages to a controller.

EDIT... (stil doesn't work)

We're using IIS10 and Azure

I've updated my web config with...

<system.web>
    <httpRuntime maxRequestLength="1048576" /> 
</system.web>

<appSettings>
    <add key="aspnet:MaxJsonDeserializerMembers" value="2147483644" /> 
</appSettings>

<requestFiltering>
    <requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
7

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.