I have a .Net Web service (.asmx) which will return a Json string to my client. However, some of my data is really large and I get this error occasionally.
The length of the string exceeds the value set on the maxJsonLength property.
I've changed the maxJsonLength property to 2147483644, but it still doesn't work. Please help... Thank you.
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483644"/>
</webServices>
</scripting>
</system.web.extensions>
[WebMethod]
[ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]
public void GetData(string login)
{
// throw an error on this line...
string result = new JavaScriptSerializer().Serialize(service.GetData(login));
Context.Response.Write(result);
}