none
Statusing.UpdateStatus error: ProjectIdInvalid RRS feed

  • Question

  • Hi everyone,

    I'm trying to convert a Project Professional demo file with macros to a console program which read data from database and insert in Project Server through PSI.

    All is working fine less when in the demo is used the "ActiveProject.Tasks.UniqueID(idunicotarea).Assignments.UniqueID(idunicores).TimeScaleData(StartDate:=fechaini, EndDate:=fechafin, Type:=10, TimeScaleUnit:=4, Count:=1).Item(1).Value" to read or set its value.

    I'm trying to use de statusingSvc.UpdateStatus(changeXml) but I'm getting error: ProjectIdInvalid. Anyone knows the reason for this error?

    Thank you in advanced. Regards.

    Thursday, May 3, 2012 4:15 PM

Answers

  • Hi Amit,

    Thank you for the reply. Seeing the sample, I found the error. I was calling the UpdateStatus before publish the project. Now this problem is solved, but I'm getting a GeneralSecurityAccessDenied error.

    In Server Settings - Manage Users, I click my user name and in Global Permissions I give permissions for all points in Time and Task Management.

    I'm thinkng I need to do something more, but I'm getting lost.

    Regards.

    • Marked as answer by LyE- Tuesday, May 8, 2012 11:24 AM
    Friday, May 4, 2012 10:28 AM
  • Hi Amit,

    Don't worry for the delay...

    Following the steps you told me, I could checked that the status broker permission is checked.

    At the end, I was able to resolve the issue by adding this code before call the UpdateStatus method:

                System.Security.Principal.WindowsImpersonationContext impersionationContext;
                System.Security.Principal.WindowsIdentity currentWindowsIdentity;
                currentWindowsIdentity = System.Security.Principal.WindowsIdentity.GetCurrent();
                impersionationContext = currentWindowsIdentity.Impersonate();
    

    Then after the call to the UpdateStatus I've called the SubmitStatus... but no changes where made in the project. At least, I am not able to find it in the project, neither in the web application, neither through the project professional.

    I think something is wrong but I don't know what is it!

    Regards.

    LyE

    Tuesday, May 8, 2012 10:59 AM

All replies

  • Hi there--

    Did you open the project plan from server? How are you updating the Changexml? Did you try to debug to see the ProjectID which is from projectdataset macthing with the ChangeXMl?

     Please see if the below sample helps:
    http://msdn.microsoft.com/en-us/library/websvcstatusing.statusing.updatestatus.aspx

    You may try using the ChangeXMl utility to see if the ProjectID is not matching?

    http://blogs.msdn.com/b/project_programmability/archive/2012/03/20/using-the-updated-changexml-utility-for-statusing.aspx


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    Friday, May 4, 2012 8:46 AM
  • Hi Amit,

    Thank you for the reply. Seeing the sample, I found the error. I was calling the UpdateStatus before publish the project. Now this problem is solved, but I'm getting a GeneralSecurityAccessDenied error.

    In Server Settings - Manage Users, I click my user name and in Global Permissions I give permissions for all points in Time and Task Management.

    I'm thinkng I need to do something more, but I'm getting lost.

    Regards.

    • Marked as answer by LyE- Tuesday, May 8, 2012 11:24 AM
    Friday, May 4, 2012 10:28 AM
  • Hi there--

    Good to hear that you were able to point out the issue. since there was not code attached in thread so I had to provide you sample link.

    GeneralSecurityAccessDenied is related tho the security permissions of the user. Did you set the Logon permission to user- (which allows a user to connect to Project Server from Microsoft Project Professional or to log on to Project Web App. Grant this permission to any user who is authorized to connect to Project Server from Microsoft Project Professional or log on to Project Web App.

    http://technet.microsoft.com/en-us/library/cc197631.aspx

    http://msdn.microsoft.com/en-us/library/microsoft.office.project.server.library.pssecurityglobalpermission.logon.aspx

    Hope that helps.


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    Friday, May 4, 2012 10:55 AM
  • Hi,

    My user has the Logon permission because I'm able to connect to Project Server from Project Professional and to Project Web App.

    Now in Server Settings - Manage Groups, I click on the Administrators Group and my user is in it and all Global Permissions are checked.

    Regards.

    Friday, May 4, 2012 11:11 AM
  • Hi there--

    Could you please verify the StatusBrokerPermission (Allows a user to read and submit status on behalf of another resource. New in Project Server 2010.)StatusBrokerPermission global permission can use the UpdateStatus method to update assignment status without impersonation, by including the new ResID attribute of the Assn element in the changeXml parameter.


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    Friday, May 4, 2012 11:26 AM
  • Hi Amit,

    It supose the user alredy has the StatusBrokerPermission, however where can I verify it? As I told you before, in Global Permissions all the checks are marked for the Administrators Group and for indiviual user too.

    Regards.

    LyE

    Friday, May 4, 2012 11:58 AM
  • Hi LyE,

    Sorry for the delayed response. Somehow I missed the thread. Is your issue resolved?

    Regarduing the StatusBrokerPermission, Go to the pwa page, then "server settings". Under "security" go to "project web app permissions". Then scroll down to see the "time and task management" where you can find "status broker permission".


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    Tuesday, May 8, 2012 9:26 AM
  • Hi Amit,

    Don't worry for the delay...

    Following the steps you told me, I could checked that the status broker permission is checked.

    At the end, I was able to resolve the issue by adding this code before call the UpdateStatus method:

                System.Security.Principal.WindowsImpersonationContext impersionationContext;
                System.Security.Principal.WindowsIdentity currentWindowsIdentity;
                currentWindowsIdentity = System.Security.Principal.WindowsIdentity.GetCurrent();
                impersionationContext = currentWindowsIdentity.Impersonate();
    

    Then after the call to the UpdateStatus I've called the SubmitStatus... but no changes where made in the project. At least, I am not able to find it in the project, neither in the web application, neither through the project professional.

    I think something is wrong but I don't know what is it!

    Regards.

    LyE

    Tuesday, May 8, 2012 10:59 AM
  • Good to hear that. initially I thought to suggest using ImpersonationContext  but somehow as per the PSI UpdateStatus call required permission don't need ImpersonationContext.


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    Tuesday, May 8, 2012 11:14 AM
  • That was I was thinking... if the UpdateStatus doesn't need impersonation why I need to use ImpersonationContext?

    And why can't I see changes in the project?

    From what I've read, the UpdateStatus is the equivalent to the TimeScaleData for an assignment using a Project Professional macro?

    Really, I'm getting lost with this theme.

    Regards

    LyE

    Tuesday, May 8, 2012 11:30 AM
  • Problem resolved...

    I was calling the SumbitStatus instead of the SubmitStatusForResource. Now I can see the changes in the project.

    Thanks!

    Thursday, May 10, 2012 11:30 AM