PSI Services returning Assignments in Web Part but not in ASP.NET Web Application RRS feed

  • Question

  • I have a Web Part that makes use of the PSI Services.  I ported the code over to a ASP.NET Web Application to make it easier to debug it.  The ASP.NET Web App uses the same code and loads the Resource Guid, the Periods and the TimeSheets via the PSI fine.  But for some reason it returns an empty result when I read the Assignments.

    It's the same code so I am wondering if there are some credentials that are set when running it through a Project Server Web Part that are not set when I run it in my "stand-alone" ASP.NET Web App.  How to fix?

    Jonathan M Beck

    Wednesday, August 22, 2012 1:23 PM

All replies

  • Hi Jonathan,

    For general debugging, I follow the console app & while calling the PSI, I use the class instance with default creadentials.
    UseDefaultCreatentials = true.

    for example, when I call the Resource web sevrice,

    ResourceSvc.ResourceDataSet rds = new ResourceSvc.ResourceDataSet();
                    ResourceSvc.Resource res = new ResourceSvc.Resource();
                    res.UseDefaultCredentials = true;

    I tested with this & was able to write the dataset table in gridview on application.

    Please let me know if that helps.

    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |EPM Consultant| Blog:

    Thursday, August 23, 2012 9:42 AM
  • Amit,

    Thank you for your answer.  I am using the PSI via the references provided in the "\Microsoft SDKs\Project 2010\Documentation\Intellisense\WCF" folder such as wcf.Resource.cs

    There is no .UseDefaultCredentials in there.

    This would be a good time to ask you if I should switch my project to using the PSI Web Services as your example shows, or if it will be all right to continue down the "WCF" path?

    Jonathan M Beck

    Thursday, August 23, 2012 2:00 PM