O comprimento da cadeia excede o valor definido na propriedade maxJsonLength. em MVC3
MVC3 (arquivo .cshtml)
$.getJSON(URL, Data, function (data) {
document.getElementById('divDisplayMap').innerHTML = data;
if (data != null) {
$('#myTablesId').show();
tdOnclickEvent();
}
else {
$('#myTablesId').hide();
}
}).error(function (xhr, ajaxOptions, thrownError) { debugger; });
no lado do servidor
public JsonResult ZoneType_SelectedState(int x_Id, int y_Id)
{
JsonResult result = new JsonResult();
result.Data = "LongString";//Longstring with the length mention below
return Json(result.Data,"application/json", JsonRequestBehavior.AllowGet);
}
do lado do servidor eu estou passando a cadeia com o comprimento de 1194812 e mais do que isso. mas estou recebendo o erro dizendo que o
"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property."
Por favor me ajude ASP