"Message": "error during serialization or deserialization using the JSON parameter criptserializer.
The length of the string exceeds the value set on the maxjsonlength property. "," stacktrace ":"
In system. Web. Script. serialization. javascriptserializer.
Serialize (Object OBJ, stringbuilder output, serializationformat) \ r \ n
In system. Web. Script. serialization. javascriptserializer. serialize (
Object OBJ, serializationformat) \ r \ n
In system. Web. Script. Services. resthandler. invokemethod
(Httpcontext context, webservicemethoddata methoddata, idictionary '2 rawparams) \ r \ n
In system. Web. Script. Services. resthandler.
Executewebservicecall (httpcontext context, webservicemethoddata methoddata) "," exceptiontype ":" system. invalidoperationexception "}"
[Reprinted] while working with Ajax calland dealing with JSON data you may encounter this exception "exception message: error during serialization or deserialization using the JSON parameter criptserializer. the length of the string exceeds the value set on the maxjsonlength property ". the reason is that the data which you are dealing with for Ajax call has crossed the default limit which is defined for jsonserialization.
From msdn: http://msdn.microsoft.com/en-us/library/bb763183.aspx
"Maxjsonlength. specifies the maximum length of the JSON string (the maximum number of UTF-8 characters). The default length is 102400 ."
So the solution is that you need to increase the value for jsonserialization attribute. For example I set it to "500000"
View sourceprint
<System. Web. Extensions>
<Scripting>
<WebServices>
<Jsonserialization maxjsonlength = "500000" type = "codeph" text = "/codeph"/>
</WebServices>
</Scripting>
</System. Web. Extensions>
Below is the screen shot with the position where you need to place the "jsonserialization" tag.>