Showing posts with label return. Show all posts
Showing posts with label return. Show all posts

Saturday, March 24, 2012

How can to get a Dataset from client in Atlas?

When I return a dataset in server and get result in client, there's always a error like this

"System.InvalidOperationException - a circular reference was detected while serializing an object of type 'System.Globalization.CultureInfo'".

Does Atlas not support get a dataset ?

Add the Preview verison to work with dataset, datatables etc.


Amit
Are you referring to the May Futures and the Microsoft.Web.Preview.dll?
If so, where is the support in the May Futures for Client access to datasets/datatables?
I looked at the documentation for the Futures and didn't see it.
Thanks for your help...
Glenn Michael


No I was talking about the Ajax January CTPhttp://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en you download it from this link.

Wednesday, March 21, 2012

How can I get more size back from my WS? - System.InvalidOperationException -- Maximum len

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