none
ProjectServer 2013 : StatusingSvc.SubmitStatus() causes UnauthorizedAccessException RRS feed

  • Question

  • Dear group,

    I do have a serious issue with a webpart. The webpart is installed in ProjectServer 2013 and calls programmatically these methods:

    StatusingSvc.UpdateStatus()    // works

    and then

    StatusingSvc.SubmitStatus()    // crashes

    While UpdateStatus() works, the call of SubmitStatus() crashes seriously and returns the ProjectServer error "GeneralUnhandledException".

    A deep dive into the ULS log uncovers four longer entries regarding to the call of SubmitStatus() and its crash.

    In short I get this error:

    Unknown SPRequest error occurred. More information: 0x80070005
    SPRequest.GetAllWebsOfSite: UserPrincipalName=, AppPrincipalName= ,bstrUrl=http://pwa.dev.company.com/pwa
    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    Does someone have a clue about this error?

    Whose access is denied at this point when I call StatusingSvc.SubmitStatus()?

    Thank you very much in advance for all kinds of advice, help and hints!

    I would like to add those four error message from the ULS log.

    (I had to remove all links in the log)

    Error log 1:

    Unknown SPRequest error occurred. More information: 0x80070005
    SPRequest.GetAllWebsOfSite: UserPrincipalName=, AppPrincipalName= ,bstrUrl=http://pwa.dev.company.com/pwa
    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:
    at Microsoft.SharePoint.SPSite.SPWebCollectionProvider.GetWebsData(String[]& strNames, String[]& strServiceRelUrls, Guid[]& guidWebIds, Int32[]& nLanguages, String[]& strTitles, String[]& strDescriptions, String[]& strCreationTimes, String[]& strModifiedTimes, Boolean[]& bUserIsWebAdmins, Int32[]& nWebTemplates, Int16[]& nProvisionConfigs, Int16[]& nMeetingCounts, Int32[]& nUIVersions, Int32[]& nFlags, String[]& strMasterUrls, String[]& strCustomMasterUrls, Guid[]& guidAppInstanceIds)
    at Microsoft.SharePoint.SPWebCollection.EnsureWebsData()
    at Microsoft.SharePoint.SPBaseCollection.GetEnumerator()
    at Microsoft.Office.Project.Server.Library.PSContextInfoInternal.<>c__DisplayClass2.<DeterminePwaWebId>b__0()
    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.Library.PSContextInfoInternal.DeterminePwaWebId(Guid siteId, Int32 zone)
    at Microsoft.Office.Project.Server.Library.PSContextInfoInternal.get_PWAWebId()
    at Microsoft.Office.Project.Server.BusinessLayer.XmlBuilder.EmailCultureProvider..ctor(IPlatformContext context, Int32 lcid)
    at Microsoft.Office.Project.Server.BusinessLayer.XmlBuilder..ctor(IPlatformContext context, Int32 emailLanguageId)
    at Microsoft.Office.Project.Server.BusinessLayer.NotificationComponent..ctor(NotificationTestData notificationTestData, Guid recipientResourcesUid, IPlatformContext pltformContext, Guid notificationTypeUid, Guid emailTypeUid, String emailHeaderNodeName, String headerNodeName, String itemNodeName)
    at Microsoft.Office.Project.Server.BusinessLayer.ResourceUpdatesAssignmentNotificationComponentData..ctor(IPlatformContext platformContext, NotificationTestData notificationTestData, Guid assignmentUid, Guid projectUid, String projectName, Guid taskUid, String taskName, Guid assignedResourceUid, String assignedResourceName, Guid projectManagerUid, String projectManagerName, DateTime assignmentStart, DateTime assignmentFinish, Double assignmentWork, Double assignmentRemainingWork, String comment)
    at Microsoft.Office.Project.Server.BusinessLayer.Statusing.SubmitStatusWithResult(Guid resid, Guid[] updateGuids, String comment)
    at Microsoft.Office.Project.Server.BusinessLayer.Statusing.SubmitStatus(Guid[] updateGuids, String comment)
    at Microsoft.Office.Project.Server.Wcf.Implementation.WcfMethodInvocation.InvokeBusinessObjectMethod(String businessObjectName, String methodName, IEnumerable`1 actions)
    at SyncInvokeSubmitStatus(Object , Object[] , Object[] )
    at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
    at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
    at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
    at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
    at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
    at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
    at System.ServiceModel.Dispatcher.MultipleReceiveBinder.HandleReceiveRequestComplete(IAsyncResult innerResult, Boolean completedSynchronously)
    at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
    at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)
    at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
    at System.Runtime.InputQueue`1.AsyncQueueReader.Set(Item item)
    at System.Runtime.InputQueue`1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread)
    at System.Runtime.InputQueue`1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
    at System.ServiceModel.Channels.SingletonChannelAcceptor`3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
    at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.CompleteParseAndEnqueue(IAsyncResult result)
    at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.HandleParseIncomingMessage(IAsyncResult result)
    at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
    at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
    at System.ServiceModel.Channels.HttpInput.ParseMessageAsyncResult.OnRead(IAsyncResult result)
    at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
    at System.Web.Hosting.ReadAsyncResult.Complete(Int32 bytesRead, Int32 hresult, IntPtr pbAsyncReceiveBuffer, Boolean synchronous)
    at System.Web.Hosting.IIS7WorkerRequest.OnAsyncCompletion(Int32 bytesCompleted, Int32 hresult, IntPtr pAsyncCompletionContext)
    at System.Web.Hosting.PipelineRuntime.AsyncCompletionHandler(IntPtr rootedObjectsPointer, Int32 bytesCompleted, Int32 hresult, IntPtr pAsyncCompletionContext)
    Releasing SPRequest with allocation Id {17FC5E1E-B2EC-48A6-B44F-E86C6C22B772}

    Error log 2:

    A runtime exception was detected. Details follow.
    Message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Technical Details: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)
    at Microsoft.SharePoint.Library.SPRequest.GetAllWebsOfSite(String bstrUrl, Object& pvarWebs, Object& pvarWebIds, Object& pvarParentWebs, Object& pvarLangs, Object& pvarTitles, Object& pvarUIVersions, Object& pvarFlags, Object& pvarWebTemplates, Object& pvarConfigurations, Object& pvarMasterUrls, Object& pvarCustomMasterUrls, Object& pvarAppInstanceIds)
    at Microsoft.SharePoint.SPSite.SPWebCollectionProvider.GetWebsData(String[]& strNames, String[]& strServiceRelUrls, Guid[]& guidWebIds, Int32[]& nLanguages, String[]& strTitles, String[]& strDescriptions, String[]& strCreationTimes, String[]& strModifiedTimes, Boolean[]& bUserIsWebAdmins, Int32[]& nWebTemplates, Int16[]& nProvisionConfigs, Int16[]& nMeetingCounts, Int32[]& nUIVersions, Int32[]& nFlags, String[]& strMasterUrls, String[]& strCustomMasterUrls, Guid[]& guidAppInstanceIds)
    at Microsoft.SharePoint.SPWebCollection.EnsureWebsData()
    at Microsoft.SharePoint.SPBaseCollection.GetEnumerator()
    at Microsoft.Office.Project.Server.Library.PSContextInfoInternal.<>c__DisplayClass2.<DeterminePwaWebId>b__0()
    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.Library.PSContextInfoInternal.DeterminePwaWebId(Guid siteId, Int32 zone)
    at Microsoft.Office.Project.Server.Library.PSContextInfoInternal.get_PWAWebId()
    at Microsoft.Office.Project.Server.BusinessLayer.XmlBuilder.EmailCultureProvider..ctor(IPlatformContext context, Int32 lcid)
    at Microsoft.Office.Project.Server.BusinessLayer.XmlBuilder..ctor(IPlatformContext context, Int32 emailLanguageId)
    at Microsoft.Office.Project.Server.BusinessLayer.NotificationComponent..ctor(NotificationTestData notificationTestData, Guid recipientResourcesUid, IPlatformContext pltformContext, Guid notificationTypeUid, Guid emailTypeUid, String emailHeaderNodeName, String headerNodeName, String itemNodeName)
    at Microsoft.Office.Project.Server.BusinessLayer.ResourceUpdatesAssignmentNotificationComponentData..ctor(IPlatformContext platformContext, NotificationTestData notificationTestData, Guid assignmentUid, Guid projectUid, String projectName, Guid taskUid, String taskName, Guid assignedResourceUid, String assignedResourceName, Guid projectManagerUid, String projectManagerName, DateTime assignmentStart, DateTime assignmentFinish, Double assignmentWork, Double assignmentRemainingWork, String comment)
    at Microsoft.Office.Project.Server.BusinessLayer.Statusing.SubmitStatusWithResult(Guid resid, Guid[] updateGuids, String comment)
    at Microsoft.Office.Project.Server.BusinessLayer.Statusing.SubmitStatus(Guid[] updateGuids, String comment)
    at Microsoft.Office.Project.Server.Wcf.Implementation.WcfMethodInvocation.InvokeBusinessObjectMethod(String businessObjectName, String methodName, IEnumerable`1 actions)

    Error log 3:

    (Watson Reporting Cancelled) System.UnauthorizedAccessException: Access is denied.
    (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)
    at Microsoft.SharePoint.Library.SPRequest.GetAllWebsOfSite(String bstrUrl, Object& pvarWebs, Object& pvarWebIds, Object& pvarParentWebs, Object& pvarLangs, Object& pvarTitles, Object& pvarUIVersions, Object& pvarFlags, Object& pvarWebTemplates, Object& pvarConfigurations, Object& pvarMasterUrls, Object& pvarCustomMasterUrls, Object& pvarAppInstanceIds)
    at Microsoft.SharePoint.SPSite.SPWebCollectionProvider.GetWebsData(String[]& strNames, String[]& strServiceRelUrls, Guid[]& guidWebIds, Int32[]& nLanguages, String[]& strTitles, String[]& strDescriptions, String[]& strCreationTimes, String[]& strModifiedTimes, Boolean[]& bUserIsWebAdmins, Int32[]& nWebTemplates, Int16[]& nProvisionConfigs, Int16[]& nMeetingCounts, Int32[]& nUIVersions, Int32[]& nFlags, String[]& strMasterUrls, String[]& strCustomMasterUrls, Guid[]& guidAppInstanceIds)
    at Microsoft.SharePoint.SPWebCollection.EnsureWebsData()
    at Microsoft.SharePoint.SPBaseCollection.GetEnumerator()
    at Microsoft.Office.Project.Server.Library.PSContextInfoInternal.<>c__DisplayClass2.<DeterminePwaWebId>b__0()     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.Library.PSContextInfoInternal.DeterminePwaWebId(Guid siteId, Int32 zone)
    at Microsoft.Office.Project.Server.Library.PSContextInfoInternal.get_PWAWebId()
    at Microsoft.Office.Project.Server.BusinessLayer.XmlBuilder.EmailCultureProvider..ctor(IPlatformContext context, Int32 lcid)
    at Microsoft.Office.Project.Server.BusinessLayer.XmlBuilder..ctor(IPlatformContext context, Int32 emailLanguageId)
    at Microsoft.Office.Project.Server.BusinessLayer.NotificationComponent..ctor(NotificationTestData notificationTestData, Guid recipientResourcesUid, IPlatformContext pltformContext, Guid notificationTypeUid, Guid emailTypeUid, String emailHeaderNodeName, String headerNodeName, String itemNodeName)
    at Microsoft.Office.Project.Server.BusinessLayer.ResourceUpdatesAssignmentNotificationComponentData..ctor(IPlatformContext platformContext, NotificationTestData notificationTestData, Guid assignmentUid, Guid projectUid, String projectName, Guid taskUid, String taskName, Guid assignedResourceUid, String assignedResourceName, Guid projectManagerUid, String projectManagerName, DateTime assignmentStart, DateTime assignmentFinish, Double assignmentWork, Double assignmentRemainingWork, String comment)
    at Microsoft.Office.Project.Server.BusinessLayer.Statusing.SubmitStatusWithResult(Guid resid, Guid[] updateGuids, String comment)
    at Microsoft.Office.Project.Server.BusinessLayer.Statusing.SubmitStatus(Guid[] updateGuids, String comment)
    at Microsoft.Office.Project.Server.Wcf.Implementation.WcfMethodInvocation.InvokeBusinessObjectMethod(String businessObjectName, String methodName, IEnumerable`1 actions)

    Error log 4:

    Error is: GeneralUnhandledException.
    Details: General Unhandled Exception in _Statusing.SubmitStatus_
    Attributes:  System.UnauthorizedAccessException: Access is denied.
    (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)
    at Microsoft.SharePoint.Library.SPRequest.GetAllWebsOfSite(String bstrUrl, Object& pvarWebs, Object& pvarWebIds, Object& pvarParentWebs, Object& pvarLangs, Object& pvarTitles, Object& pvarUIVersions, Object& pvarFlags, Object& pvarWebTemplates, Object& pvarConfigurations, Object& pvarMasterUrls, Object& pvarCustomMasterUrls, Object& pvarAppInstanceIds)
    at Microsoft.SharePoint.SPSite.SPWebCollectionProvider.GetWebsData(String[]& strNames, String[]& strServiceRelUrls, Guid[]& guidWebIds, Int32[]& nLanguages, String[]& strTitles, String[]& strDescriptions, String[]& strCreationTimes, String[]& strModifiedTimes, Boolean[]& bUserIsWebAdmins, Int32[]& nWebTemplates, Int16[]& nProvisionConfigs, Int16[]& nMeetingCounts, Int32[]& nUIVersions, Int32[]& nFlags, String[]& strMasterUrls, String[]& strCustomMasterUrls, Guid[]& guidAppInstanceIds)
    at Microsoft.SharePoint.SPWebCollection.EnsureWebsData()
    at Microsoft.SharePoint.SPBaseCollection.GetEnumerator()
    at Microsoft.Office.Project.Server.Library.PSContextInfoInternal.<>c__DisplayClass2.<DeterminePwaWebId>b__0()
    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.Library.PSContextInfoInternal.DeterminePwaWebId(Guid siteId, Int32 zone)
    at Microsoft.Office.Project.Server.Library.PSContextInfoInternal.get_PWAWebId()
    at Microsoft.Office.Project.Server.BusinessLayer.XmlBuilder.EmailCultureProvider..ctor(IPlatformContext context, Int32 lcid)
    at Microsoft.Office.Project.Server.BusinessLayer.XmlBuilder..ctor(IPlatformContext context, Int32 emailLanguageId)
    at Microsoft.Office.Project.Server.BusinessLayer.NotificationComponent..ctor(NotificationTestData notificationTestData, Guid recipientResourcesUid, IPlatformContext pltformContext, Guid notificationTypeUid, Guid emailTypeUid, String emailHeaderNodeName, String headerNodeName, String itemNodeName)
    at Microsoft.Office.Project.Server.BusinessLayer.ResourceUpdatesAssignmentNotificationComponentData..ctor(IPlatformContext platformContext, NotificationTestData notificationTestData, Guid assignmentUid, Guid projectUid, String projectName, Guid taskUid, String taskName, Guid assignedResourceUid, String assignedResourceName, Guid projectManagerUid, String projectManagerName, DateTime assignmentStart, DateTime assignmentFinish, Double assignmentWork, Double assignmentRemainingWork, String comment)
    at Microsoft.Office.Project.Server.BusinessLayer.Statusing.SubmitStatusWithResult(Guid resid, Guid[] updateGuids, String comment)
    at Microsoft.Office.Project.Server.BusinessLayer.Statusing.SubmitStatus(Guid[] updateGuids, String comment)
    at Microsoft.Office.Project.Server.Wcf.Implementation.WcfMethodInvocation.InvokeBusinessObjectMethod(String businessObjectName, String methodName, IEnumerable`1 actions).
    Standard Information:
    PSI Entry Point:
    Project User: i:0#.w|company\user4676
    Correlation Id: bb03abc4-2dce-e411-b843-00505683272c
    PWA Site URL:

    SA Name: Project Service Application
    PSError: GeneralUnhandledException (42), LogLevelManager Warning-ulsID:0x00101622 has no entities explicitly specified.

    ----

    Best regards,

    Van Couver

    Saturday, March 21, 2015 12:27 AM

All replies

  • Hello Van Couver,

    can you post here the code you're using?

    Are you trying to submit status for the current user?

    Can the current user submit status using the project server native functionality?

    Cheers

    Monday, March 23, 2015 2:50 PM