none
We couldn't refresh the connection. 'OData Assignments Data'. Here's the error message we got: The remote server returned an error: (500) Internal Server Error.

    Question

  • I have been looking into this issue over the last few days and finally came across this thread.

    https://social.technet.microsoft.com/Forums/projectserver/en-US/27f029b7-4f5d-40f1-8734-83fdb2332164/we-couldnt-refresh-the-connection-odata-assignements-data-error-while-access-the-project?forum=projectserver2010general

    My problem is a little different as it is trying to refresh and I am seeing an Access Denied error in the ULS logs whenever I try to refresh.  This is the error from the logs:

    A runtime exception was detected. Details follow.  Message: Access to the path 'C:\Windows\TEMP\mnyuhhii.tmp' is denied.  Technical Details: System.UnauthorizedAccessException: Access to the path 'C:\Windows\TEMP\mnyuhhii.tmp' is denied.   

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)   

    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)   

    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)   

    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)   

    at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()   

    at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)   

    at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)   

    at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)   

    at Microsoft.Office.Project.Server.BusinessLayer.

    ODataBusinessObjectWrapper.<>c__DisplayClass4.<BuildOdataServiceTypeForCulture>b__3()   

    at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()   

    at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)   

    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)   

    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)   

    at Microsoft.Office.Project.Server.BusinessLayer.

    ODataBusinessObjectWrapper.BuildOdataServiceTypeForCulture(IODataContext context, String nameSpace, String localizedOdataServiceName)   

    at Microsoft.Office.Project.Server.BusinessLayer.

    ODataBusinessObjectWrapper.GetOdataServiceTypeForCultureThreadSafe(IODataContext context)   

    at Microsoft.Office.Project.Server.BusinessLayer.

    ODataBusinessObjectWrapper.<>c__DisplayClass1.<GetServiceInstanceForRequestedLanguage>b__0()   

    at System.Lazy`1.CreateValue()  --- End of stack trace from previous location where exception was thrown ---   

    at Microsoft.Office.Project.Server.BusinessLayer.

    ODataBusinessObjectWrapper.GetServiceInstanceForRequestedLanguage(IODataContext context)   

    at Microsoft.Office.Project.Server.Wcf.Implementation.

    Odata.ProcessOdataMessage(OdataMessage incomingMessage)

    I saw a response saying that these reports only work in Project Online.  If that's the case then why are they installed on Project Server 2013 and seem to attempt to function?

    ______________________________________

    Arcan.NET
    https://arcandotnet.wordpress.com/
    • Changed type Arcan.NET Tuesday, March 17, 2015 4:06 PM
    • Edited by Arcan.NET Wednesday, April 1, 2015 4:56 PM
    Tuesday, March 17, 2015 3:55 PM

All replies

  • Hello,

    The Excel reports with that consume the ProjectData OData API will only refresh in the browser in Project Online, if you want to use the ProjectData OData API for Project Server 2013 on-prem you will need to refresh the reports in the Excel desktop client. For Project Server 2013 on prem I would look as using T-SQL directly against the Reporting Schema (.dbo) or the OLAP cube as the data sources in the Excel based reports. Those reports will refresh in the browser once you have set up the reporting: https://technet.microsoft.com/en-us/library/ee662106.aspx

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads

    Tuesday, March 17, 2015 5:01 PM
    Moderator
  • Thanks for the quick reply.  I am opening the OData reports in the Excel 2013 desktop client when I get the error:

    We couldn't refresh the connection.  'OData Assignments Data'.  Here's the error message we got:  The remote server returned an error: (500) Internal Server Error.

    I can find the correlated Access Denied in the OLS logs.  I would be more than happy to make use of these default reports via the desktop client if they worked.  I have even tried granting 'Everyone' modify rights on the temp folder but I still have the same issue.  If this should work then I would really like to solve this error.

    The environment is a single Windows 2008 R2 server with SharePoint and Project 2013 installed on it with a separate back end SQL Server. I currently have no errors or critical messages in the event logs of any kind over the last few days.

    Tuesday, March 17, 2015 5:17 PM
  • Ok, what permission mode is your Project Server 20103 PWA instance using, SharePoint mode or Project mode? The ProjectData API is permission controlled, if in the Project permission mode, make sure you are in a Security group that has "Access Project Server Reporting Service" enabled, if in the SharePoint permission mode you will need to be in one of the following SharePoint groups: Administrators, Portfolio Managers, Portfolio Viewers. If you have the correct access, can you navigate to the following URL (update with correct URL) in Internet Explorer:

    <server / PWA path>/_api/ProjectData/[en-US]/Assignments?$select=ProjectId,AssignmentId,AssignmentActualCost,AssignmentActualWork,AssignmentCost,AssignmentWork,ProjectName,ResourceId,ResourceName,TaskId,TaskIsActive,TaskName

    Does that return data? If you don't see XML data, disable the “Turn on feed reading view” in Internet Explorer as described here: https://pwmather.wordpress.com/2014/07/17/getting-started-with-projectonline-part-9-ps2013-office365-project-ppm-sharepointonline-pm-sp2013/    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads

    Tuesday, March 17, 2015 8:30 PM
    Moderator
  • The PWA instance is in SharePoint Mode.  I am running all the tests using my account which is a Site Collection Admin and a member of Administrators for Project Web App.

    I navigated to the link you posted and the browser returned a (500) Internal Server Error.

    I went through my trace longs again and found where I accessed the URL:

    Request:

    Name=Request (GET:https://ourcompany.site:443/pwa/

    _api/ProjectData/%5Ben-US%5D/Assignments?$select=ProjectId,AssignmentId,AssignmentActualCost,AssignmentActualWork,AssignmentCost,AssignmentWork,ProjectName,ResourceId,ResourceName,TaskId,TaskIsActive,TaskName)

    Error:

    A runtime exception was detected. Details follow.  Message: Access to the path 'C:\Windows\TEMP\mnyuhhii.tmp' is denied.  Technical Details: System.UnauthorizedAccessException: Access to the path 'C:\Windows\TEMP\mnyuhhii.tmp' is denied.   

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)   

    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)   

    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)   

    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)   

    at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()   

    at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)   

    at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)   

    at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)   

    at Microsoft.Office.Project.Server.BusinessLayer.ODataBusinessObjectWrapper.<>c__DisplayClass4.<BuildOdataServiceTypeForCulture>b__3()   

    at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()   

    at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)   

    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)   

    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)   

    at Microsoft.Office.Project.Server.BusinessLayer.ODataBusinessObjectWrapper.BuildOdataServiceTypeForCulture(IODataContext context, String nameSpace, String localizedOdataServiceName)   

    at Microsoft.Office.Project.Server.BusinessLayer.ODataBusinessObjectWrapper.GetOdataServiceTypeForCultureThreadSafe(IODataContext context)   

    at Microsoft.Office.Project.Server.BusinessLayer.ODataBusinessObjectWrapper.<>c__DisplayClass1.<GetServiceInstanceForRequestedLanguage>b__0()   

    at System.Lazy`1.CreateValue()  --- End of stack trace from previous location where exception was thrown ---   

    at Microsoft.Office.Project.Server.BusinessLayer.ODataBusinessObjectWrapper.GetServiceInstanceForRequestedLanguage(IODataContext context)   

    at Microsoft.Office.Project.Server.Wcf.Implementation.Odata.ProcessOdataMessage(OdataMessage incomingMessage)

    I can provide you more information from the log on this item if you want it. There is about 20 entries for this correlation ID.

    Tuesday, March 17, 2015 10:10 PM
  • Hello,

    What do you see in the Windows event logs on the web / app servers? I have seen something similar before when there was not enough available memory on the server. In my case I just rebooted the server and it was resolved but that was my test servers so it was below the minimum specifications.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads

    Thursday, March 19, 2015 5:32 PM
    Moderator
  • Hello,

    That's the least helpful thing about this problem is I don't have any errors in the event log other than some health analyzer issues about available disk space.  The server has 32GB of memory available which is rarely more than half utilized.  I rebooted the server about a week ago and I believe this problem was present within a day or two of that.

    Thursday, March 19, 2015 8:55 PM
  • Hello. So it worked fine initially after the reboot? Paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads

    Thursday, March 19, 2015 11:30 PM
    Moderator
  • No, I don't believe this has ever worked.  I have been thinking its some sort of permissions issue but I cannot find any explanation or references to the errors I have been seeing anywhere.
    Friday, March 20, 2015 3:28 PM