Closed Tasteful closed 9 years ago
I'm not sure I support this level of indirection as it restricts the flexibility much more for the implementation down the road. Are you not adjusting the JSON length in your web.config already? Like this:
<configuration>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="50000000"/>
</webServices>
</scripting>
</system.web.extensions>
</configuration>
That's the proper fix here, and what we do on Stack Overflow for many other reasons as well. That being said, that's still a decent sized error, I'd look if there's either an enormous stack which needs resolving or a large form field you'd rather ignore.
As an aside: please look at tabs vs. spaces when contributing to projects please! You can click the changes tab on this pull request to see the inconsistencies I mean.
In one of my costomers environemnt I got the following error/message when the object should be stored down to SqlErrorStore
To be able to configure the maxJsonLength property on the
JavaScriptSerializer
theError.cs
need to be extendable to allow configuration of the converter.With the configurable Func-properties it will be possible to change the json serialization to ex Json.net without to create a direct dependency to the thirdparty assembly.