LoadOperation fails when retrieving more than X number of results

2 posts, 0 answers
  1. Morgan
    Morgan avatar
    4 posts
    Member since:
    Dec 2011

    Posted 21 Dec 2011 Link to this post

    I have a RIA service setup with a parameterized query:
    public IQueryable<EASI2011> GetCustomersTopX(int numberToRetrieve)         
    return this.DataContext.Customer.Take(numberToRetrieve);         

    Everything works fine with the LoadOperation when I have numberToRetrieve set to ~115 or below. If numberToRetrieve is set any higher, loadOperation.Error.Message contains:

    at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
       at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
       at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
       at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )

     Load operation failed for query 'GetCustomersTopX'. The remote server returned an error: NotFound.

    I have followed the tutorials almost exactly, so I am a bit stuck. The error message is obviously not all too
    informative, but testing definitely suggests the success of the query depends on the number of rows returned.
    Is there some sort of default that throws and exception when the result of a query becomes to large? If so,
    how can I change this?
  2. Thomas
    Thomas avatar
    588 posts

    Posted 22 Dec 2011 Link to this post

    Hello Morgan,

    can you please have a look at this link and see if you can obtain more information on the exact reasons why the operation fails?

    All the best,
    the Telerik team

    Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

  3. DevCraft banner
Back to Top