Posts

Showing posts from February, 2017

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

Route ' ' threw Exception System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. Solution -  Working with JSON within Web Services recently has become the latest and greatest simply because it plays so nicely with others and can often be very easily serialized and deserialized to fit your needs. There is just something rewarding about having a massive collection of complex objects that can be throw into a simple string and passed across however you see fit and then completely regenerated in its original collection in just a handful of code. However sometimes these strings can get big and I mean really big, like exceeding default values big and when this happens, exceptions happen. This post will cover a few ways that you can prevent a nasty  InvalidOperationException  that may look something like this with ease : The Probl