title: .Net Core POST Request Array size limit
body: <p>I have a UI written in JavaScript with a .net core backend. My ajax call in JS looks like this:</p>
  
  <pre><code>const data = { users: userArray, message: sendMessage, url: optUrl };
  
  $.ajax({
      type: "POST",
      url: `${App_Url}/ui/Notifications/send`,
      dataType: "application/json",
      data: JSON.stringify(data),
      success: (response) =&gt; {
          // if (spinner)
          //   spinner.stop();
          //
          notifySuccess("Users imported successfully!");
          $("#user_table").html(response);
      },
      error: (error) =&gt; {
          //if (spinner)
          //  spinner.stop();
          //
          notifyErrors(error.responseJSON.errors);
      }
  });
  </code></pre>
  
  <p>Now the problem that I'm having is that when my userArray is bigger than some number (not sure what the number is) then my server seems to just drop the call. For example when my userArray is size 15 I can set a break point in the .NET controller and get to it just fine. However when my userArray is 1000 I don't even get to the break point and my server returns a 500. What is causing this and how do I go about fixing it?</p>
  
  <p>My controller:</p>
  
  <pre><code>    [HttpPost("send")]
      [DisableRequestSizeLimit]
      public async Task&lt;IActionResult&gt; SendNotificationsAsync(CustomNotificationRq request)
      {
          var token = await _service.GetMiddlewareToken();
          var users = request.users;
          var message = request.message;
          var url = request.url;
  
          var response = await _service.SendNotificationAsync(users.ToList(), message, url, token.token);
  
  
          return response;
      }
  </code></pre>