Hi all,
i'm facing "The length of the string exceeds the value set on the maxJsonLength property" when i'm trying to display a big report.
i did some tricks like setting the web.config as below:
<configuration>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483644" />
</webServices>
</scripting>
</system.web.extensions>
</configuration>
but no luck.
As JsonResult class and ReportViewerHtmlActionResult class Inheritance from ActionResult,
i can override the json in the controller as below
protected override JsonResult Json(object data, string contentType, System.Text.Encoding contentEncoding, JsonRequestBehavior behavior)
{
return new JsonResult()
{
Data = data,
ContentType = contentType,
ContentEncoding = contentEncoding,
JsonRequestBehavior = behavior,
MaxJsonLength = Int32.MaxValue
};
}
but because i need to return a ReportViewerHtmlActionResult i cannot set the maxJsonLength :(
how do you guys display a big report?
i look the sample but my report is away bigger.
any sample code?
Kind regards Aleixo
PS i'm using VS 2013 with MCV 5