Handling large blocks of content in novella
Ok, so a client who is using novella (the latest version) was running into a problem where they could see their block on the public side, but got a javascript error when they tried to load it in the editor.
So I went to debug it and found that this error was being thrown:
“Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.”
Basically it means that the block was just too darn big for the objects used on the admin side to handle. I didn’t want to tell the client “just use less content!!” so I went hunting and found a a great answer here.
To sum it up, basically you need to update your web.config to alter how large the JSON objects can be. To do this you simply need to add the following lines right above the
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483647"></jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
Note that this number (2147483647) is the largest it can be because the property is an int. If you have content larger than that then tell your client “just use less content”!!
So if anyone using novella (and I know you are out there!) runs into this problem, I hope this helps.

