1

we are sending POST with JSON object like:

{
   "ListId": "1",
   "Items": [
    {
        "EmailAddress": "awesomeemail@awesome.com",
        "PhoneNumber": "sample string 2",
        "FirstName": "sample string 3",
        "LastName": "sample string 4",
        "Gender": 0,
        "Industry": "sample string 6",
        "ItemFieldValues": [
            {
                "TextValue": "sample string 1",
                "NumberValue": 2,
                "MoneyValue": 3.0,
                "YesNoValue": true,
                "DateValue": "2017-01-12T11:47:52.0699749+02:00",
                "ItemFieldId": 5
            },
        ]      
    },
    ]
}

When Items are around 30 000 or less, the controller is hit and the JSON is parsed by the model binder successfully. When I try to send 50 000 the IIS returns "404 not found". Not even Application_BeginRequest is fired in the Global.asax. I have tried to add these lines to the web config file.

<jsonSerialization maxJsonLength="50000000"></jsonSerialization>

and

<httpRuntime executionTimeout="2147483647" maxRequestLength="2147483647" />

and

<add key="aspnet:MaxJsonDeserializerMembers" value="2147483647" />

We need to be able to POST millions of Items in one request. I have Test Console application which generates the json and send it to the server via custom WebClient(no timeout problem) all on localhost env. I think the problem is with the Http Buffer, but can't come up with or find solution. Any suggestions?

  • 1
    Besides, _"We need to be able to POST millions of Items in one request"_ - you really want to reconcider that. – CodeCaster Jan 12 '17 at 10:36
  • 1
    iis itself has a limit https://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits – a-man Jan 12 '17 at 15:37

0 Answers0