I'm working on this webservice. I can easily getting my databack (an array of my custom object) but i'm now trying to return an array of 1,000 results to 5,000 results but I keep getting the error:
The Server method 'getPlaybackInformation' failed with the following error:
System.InvalidOperationException -- Maximum length exceeded.
I tried putting this in my web.config:
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="500000">
</jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
but that got me no where.
Any Thoughts?
I came across the same problem, my web service returned a string that exceeded the limit
I applied the maxJsonLength that you attempted, into my web.config, and that fixed my problem completely...
I don't believe that changing the max JSON serialization length will do anything for you. That is how much data can be serialized at one into JSON, but you aren't returning JSON, you are returning an array of objects. What you need to do is turn up the max allowable data that can be transferred in the application. In the web.config add:
<configuration>
<system.web>
<httpRuntime maxRequestLength="500000" />
</system.web>
</configuration>
Note that the size is in kilobytes.
http://msdn2.microsoft.com/en-us/library/e1f13641(vs.71).aspx
No comments:
Post a Comment