This is a migrated thread and some comments may be shown as answers.

LoadOperation fails when retrieving more than X number of results

1 Answer 42 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Morgan
Top achievements
Rank 1
Morgan asked on 21 Dec 2011, 08:22 PM
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?

1 Answer, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 22 Dec 2011, 11:50 AM
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,
Thomas
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!

Tags
Development (API, general questions)
Asked by
Morgan
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Share this question
or