Good Morning all,
I'm having trouble with a web service I've written which returns JSON. When the service is called I am getting a MaxJsonLength exceeded error (length is about 172k including JSON syntax, or 44k without, not sure which is relevant?). I have tried to set the max length to my JavaScriptSerializer within my WebMethod, but it doesn't seem to make any difference, here is my code :-
JavaScriptSerializer js = new JavaScriptSerializer();
js.MaxJsonLength = Int32.MaxValue;
string strJSON = js.Serialize(JaggedArray);
return strJSON;
if I step through in debug, the max length appears to be set, and if I call the method from the .asmx the results come back fine, the error only occurs when I call the method from my page via a jQuery ajax call.
can any one help?
Cheers
Gib