When I try executing below line of code on project server I get unknown error . Could you please help me out on this?
projContext = new ProjectContext(pwaPath);// Get the list of enterprise resources in Project Web App.
EnterpriseResourceCollection EnterpriseResources=projContext.EnterpriseResources;
projContext.Load(EnterpriseResources);
projContext.ExecuteQuery();
When I look at the stack trace I see following error message.
Exception occured in scope Microsoft.ProjectServer.EnterpriseResourceCollection._SerializeToJson. Exception=System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.ProjectServer.CustomFieldValueBase.<>c__DisplayClass3.<get_Value>b__2(Guid id) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Microsoft.ProjectServer.CustomFieldValueBase.get_Value() at Microsoft.ProjectServer.EnterpriseResource.GetCustomFieldValue(String fieldName) at Microsoft.SharePoint.Client.ServerStub.WriteAsJson(JsonWriter writer, Object obj, ClientObjectQuery objectQuery, ProxyContext proxyContext) at Microsoft.SharePoint.Client.ServerStub.WriteChildItems(JsonWriter writer, Object obj, ClientObjectQuery objectQuery, ProxyContext proxyContext) at Microsoft.SharePoint.Client.ServerStub.WriteAsJson(JsonWriter writer, Object obj, ClientObjectQuery objectQuery, ProxyContext proxyContext) at Microsoft.SharePoint.Client.ServerStub.WriteAsJsonWithMonitoredScope(JsonWriter writer, Object value, ClientObjectQuery objectQuery, ProxyContext proxyContext)
When I try to access the webservice at ../PWA/_api/ProjectServer/EnterpriseResources
I get below error