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

DataService API - No data returned.

3 Answers 81 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Raymond
Top achievements
Rank 1
Raymond asked on 07 Apr 2012, 05:12 PM
Hello,

My Forms based login has half a dozen projects linked to it, I am expecting when I ask for Projects that they would all be returned. The same methods DO return data and the auth seems to be okay.

However I get three different results, I am using the straight method instead of async calls to see if I would get a better result.

If I paste the URI in to a web browser then it seems to return data just fine. If someone could point us in the right direction it would be very helpful.

 

private static void GetProjects()
{
 
    string uri = string.Format("Projects");
    var projects = dataContext.Execute<Project>(new Uri(uri, UriKind.Relative));
 
 
 
  
    foreach (Project projectYo in projects)
        {
            Console.WriteLine("Project " + projectYo.Description + " retrieved with summary " +
                projectYo.Comments);
        
     
    }
        
  
    
}

 

1. No rows returned.
2. During the ForEach "The closed type TeamPulseDataServiceSample.TeamPulse.Project does not have a corresponding PortalState settable property."
3. During For Each "Only a single enumeration is supported by this IEnumerable."



GetStoryAcceptanceCriterias

Works every time.

GetProblemAndProblemAcceptanceCriteria
Slow buts works


3 Answers, 1 is accepted

Sort by
0
Accepted
David Harris
Telerik team
answered on 10 Apr 2012, 03:32 PM
Hi Raymond,

I think perhaps the TeamPulse Service Reference in your project is out of date. Could you please try the following and report back the results?

1) In Visual Studio, with your project open, expand the Service References folder so that the TeamPulse node is exposed.
2) Right-click the TeamPulse service reference node and choose "Update service reference" from the context menu that appears.
3) Rebuild and run your application.

I have attached a screenshot depicting the context menu and selection.

Regards,
David Harris
the Telerik team
0
Raymond
Top achievements
Rank 1
answered on 11 Apr 2012, 05:43 PM
Thanks so much, I had to delete the reference entirely then recreate it. It's working great now.
0
David Harris
Telerik team
answered on 12 Apr 2012, 03:57 PM
Hi Raymond,

We are happy to hear that replacing the service reference resolved your issue. We have updated the TeamPulseDataServiceSample project to include an updated service reference for future downloaders.

Regards,
David Harris
the Telerik team
Tags
General Discussions
Asked by
Raymond
Top achievements
Rank 1
Answers by
David Harris
Telerik team
Raymond
Top achievements
Rank 1
Share this question
or