Tuesday, November 1, 2011

maxJsonLength error message

I have run into the following error message on a MS Sharepoint site more than once now and I figured it might be helpful to document it. I ran into this using PerformancePoint Dashboard Designer so my description will be relevant to that.

Exception Details: System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

This has to do with a setting in your web.config file.

For example the following setting restricts the json string length to 50000
<jsonSerialization maxJsonLength="500000">


Although it is not recommended that you change this setting, you could change it. Generally when this error is thrown, it means that you are doing something like trying to display too many members in a chart, or at least trying to filter a set containing too many members. Since behind the scenes the MDX still has to initially work with the whole set before filtering it, you are likely to still run into this problem even when you think that it should not cause an error.


Make sure that your filters are not passing too many members to handle, to the charts for instance.


Hope this helps a bit.


Give me a shout if you want me to be more specific.


Happy coding,


Hermann

No comments:

Post a Comment