I am retrieving JSON but due to its limited length (2147483644), I am getting this error.
How can I catch this error?
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
This is how I am coding right now.
[HttpGet]
public JsonResult GetSearchData(string filter)
{
IRemediationService svc = new RemediationService();
var data = svc.SearchData(filter);
try{
return Json(data, JsonRequestBehavior.AllowGet);
}catch(Exception e){
return "Error";
}
}