Exception while reading resources through code RRS feed

  • Question

  • While reading resources of PWA through CSOM after initializing project context, using the project context to read resources is throwing exception Exception Type: Microsoft.SharePoint.Client.ServerException  Source: Microsoft.SharePoint.Client.Runtime  Message: Unknown Error  Trace:    at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)

    Wednesday, June 3, 2015 6:53 AM

All replies

  • Could you check this blog which has a sample code to read resources

    Thanks --Ajith

    Wednesday, June 3, 2015 1:26 PM
  • Thankyou!! Ajith

    Actually my code is working fine in Dev but its throwing the exceptioon in UAt environment. I have tried the console application one one fo the uat servers in the farm. The code suggested by you is working fine but the below still throws exception after load near execute.

    An unhandled exception of type 'Microsoft.SharePoint.Client.ServerException' occurred in Microsoft.SharePoint.Client.Runtime.dll

    var resinfo = new EnterpriseResourceCreationInformation();

    projContext =

    new ProjectContext(pwapath);

    EnterpriseResourceCollection oResCollection = projContext.EnterpriseResources;

    projContext.Load(oResCollection, o => o.IncludeWithDefaultProperties(i => i.User));



    Thursday, June 4, 2015 12:59 PM
  • if the same code is working in Dev and other CSOM read resource code is working in UAT , this can be a Data issue.

    Could you try reading a individual user information using where.. [from EnterpriseResources collection]

    Thanks --Ajith

    Friday, June 5, 2015 11:45 AM