Reputation: 339
Post works with array length 20 but not working with array length 2000:
js/anglular
$http.post('/index/SaveArray', $scope.SaveList).then(
function successCallback(response) {},
function errorCallback(response) {}
);
C#
public ActionResult SaveArray(List<SelectModel> dataToSave)
{
StringBuilder str = new StringBuilder();
JsonResult objResult = new JsonResult();
return Json(objResult, JsonRequestBehavior.AllowGet);
}
Upvotes: 1
Views: 126
Reputation: 9708
You can add this key to App Setting tag in the web.config file.
this setting increase elements allowed to deserialize.
<appSettings>
<add key="aspnet:MaxJsonDeserializerMembers" value="2147483644" />
</appSettings>
Upvotes: 3