I've only seen a few other posts on the internet about this error message, and none of them seem to give an answer that's relevant to Silverlight asynchronous code.
I have a data service operation, I call it from a Silverlight client. I know the service operation is returning the desired data, because I have tested the code in a synchronous aspx page load and browsed it with the debugger.
However, whether I have the service operation method return an IQueryable or an IEnumerable, I can't iterate through the results in the Silverlight client code - I receive the error in the title of this post. I can't do a foreach, I can't do a
for loop, I can't do a ToList, they all give that error.
private void on_oppquery(IAsyncResult result)
/*Use dispatcher to ensure that the asynch call returns in the correct thread*/
IEnumerable<opportunity> response = null;
/*Since this is the first page, we get back the query*/
var query = result.AsyncState as DataContext;
/*Get the response of the query*/
response = query.EndExecute<opportunity>(result);
/*Enumeration executes the query*/
//foreach (opportunity o
View Complete Post