none
Using PSI for Project Online RRS feed

  • Question

  • Hi,

    I have been using PSI for Project Online until recently. Now I am not able establish a connection, I keep getting Fault exception -

    System.ServiceModel.FaultException: Unhandled Communication Fault occurred

    Server stack trace:
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Office.Project.Server.Interfaces.IWorkflow.ReadWorkflowStage(Guid workflowStageUid)
       at ProjectStageChangeWeb.ProjectStageChange.SaveProjectWorkflow(Object sender, EventArgs e) in c:\PPMW\EPTSample\ProjectStageChangeWeb\ProjectStageChange.aspx.cs:line 216
       at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
       at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    I am using following code -

    using (ProjectContext context = ProjectContextFactory.GetProjectContextWithUserPass(projectOnlineUrl, username, pwd))
                    {
                        Console.WriteLine("Dumping project list");
                        var stageGuid1 = Guid.Parse(ddlWorkFlowStage.SelectedItem.Value);
                        WorkflowDataSet wfDs = context.GetWorkflow().ReadWorkflowStage(stageGuid1); //.GetPWA().ProjectReadProjectListForTimeline();

                        //wfDs.WorkflowInstance.
                        WorkflowDataSet.WorkflowStageRow sRow;
                        sRow = wfDs.WorkflowStage.FindBySTAGE_UID(stageGuid1);
                        sRow.STAGE_NAME = ddlWorkFlowStage.SelectedItem.Text;
                        //Console.WriteLine("Updating the stage name........");
                        wfDs.UpdateProjectWorkflows.AddUpdateProjectWorkflowsRow(Guid.NewGuid(), publishedProject.Id, publishedProject.EnterpriseProjectType.Id, false, stageGuid1);
                        context.GetWorkflow().QueueUpdateProjectWorkflows(wfDs);

                    }

    Thanks in advance.


    Tuesday, August 8, 2017 7:04 PM

Answers

  • Thanks a lot Amit, by catching the Fault Exception I could figure out that the URL should end with "/" for PSI to work.
    Tuesday, September 26, 2017 6:49 PM

All replies

  • Hey there,

    Do you get the below message consistently or kind of intermittent? Are you on SharePoint security mode for PWA?

    System.ServiceModel.FaultException: Unhandled Communication Fault occurred

    Please let us know and will try to help.

    Thanks,


    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |Director- PPM Consulting and Managed Services| Blog: http://ppm365.blogspot.com/ LI: http://www.linkedin.com/in/amitkhare82

    Thursday, September 14, 2017 9:55 PM
  • Thanks Amit for the help. We are not on Sharepoint security mode for PWA.

    Also we are getting this error everytime the service is hit.

    Thanks

    Nilesh

    Friday, September 15, 2017 7:38 PM
  • Nilesh,

    • Did you check if the account that you are using has the access to the ManageWorkflow global permission or the ChangeWorkflow global permission? 
    • try to catch (System.ServiceModel.FaultException ex) {
      and look into ex.innerException

    We may get some details..

    Thanks,


    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |Director- PPM Consulting and Managed Services| Blog: http://ppm365.blogspot.com/ LI: http://www.linkedin.com/in/amitkhare82

    Friday, September 15, 2017 8:21 PM
  • Thanks a lot Amit, by catching the Fault Exception I could figure out that the URL should end with "/" for PSI to work.
    Tuesday, September 26, 2017 6:49 PM
  • You are most welcome Nilesh.

    Please mark the reply as answer if that helped you to get it the issue resolved.


    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |Director- PPM Consulting and Managed Services| Blog: http://ppm365.blogspot.com/ LI: http://www.linkedin.com/in/amitkhare82

    Friday, September 29, 2017 3:00 PM