System.InvalidOperationException: Maximum length exceeded

Hi! I am using dhtmlxCombo in an ASP.NET project, and when I retrieve data from the server with PageMethods.GetData(…), I receive a System.InvalidOperationException: Maximum length exceeded.
I found two solutions related to this problem:

  1. There is a path in the server (C:\WINDOWS\Microsoft.NET\Framework\vXXX\CONFIG) where is a file called machine.config. Add the tag <httpRuntime maxRequestLength=<max_bytes> /> (vishwamohan.com/post/2006/12 … eeded.aspx). This solution does not take effect on my environment.
  2. For a JSON query (geekswithblogs.net/JavaScripting … eeded.aspx). In the web.config file, there is a specific tag for JSON queries.
    My question: is there something like 2) that for dhtmlx components or this exception is an ASP.NET problem that has not nothing related to dhtmlx components?

Any response will help. Thank you very much.

oocanto

It is similar to the long-url issues, there is a limitation on long URI ( about 2 or 4kb ), if you want to send a bigger amount of data you need to use POST request.

Hello.
I solved this problem just by uncommenting this line in Web.config file:

<jsonSerialization maxJsonLength="500">

I use now a value of 5000000.
Thank you very much.
Dulas!