silverlightmvvmentity-framework-4riapresentation-model

WCF RIA Capping out at 4096 Records


Just wanted to know if anyone has run into this problem or knows why this is happening.

I am doing a really simple mvvm test application. Everything works.

The only problem is that I have a DB with 4588 records and when i try to pull them all, my loadoperation craps out.

If I narrow it down to .take(4095), this works. So my Computer Science Spidy Sense started buzzing. I know this number. It then dawned on me that 4095 ( 4096 records actually since the collection is 0 based) is 8^4 or in other terms 32bits. Is this a built in limitation in RIA? 32 bits? ..or just a good CS round number that was used to cap the calls?

So then I decided to try it another way using a custom domain service and a presentation model.

The wierd thing is that I was able to get all 4588 records.

That also had issues, for instance I was only able to hang 12 properties off of my presentation model. Once I added another property, it broke. But the original problem of 4096 record limit wasn't showing up with the PM.

Any ideas?

Thanks in advance!!!


Solution

  • It's possible you are running into the default limit for MaxItemsInObjectGraph, I've used the approach given here to resolve in the past:

    http://blogs.objectsharp.com/CS/blogs/dan/archive/2010/04/13/maxitemsinobjectgraph-wcf-ria-services-exception.aspx