locked
Unhandled Communication Fault occurred happens intermittently RRS feed

  • Question

  • I have some PSI code that I run as a console application to update some custom field values. The first PSI call is to ReadCustomFields(), but that is irrelevant.

    I am finding that about half the time, this call gets the error: Unhandled Communication Fault occurred. The other half it works as expected.

    I can't figure out why it happens, but I have found that logging on with IE to the PWA instance I am connecting to with the PSI code, resolves it for a period of time. Then it stops working again. I log in with IE using the same credentials as I pass in to the WCF Client. Here's the code I use to pass in credentials to the WCF Client:

    customFieldsClient.ClientCredentials.Windows.ClientCredential = new NetworkCredential(username, password, domain);

    I also set my basicHttpConf binding ClientCredentialType like this:

    binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;

    Does anyone else have this problem on a standalone console application?

    Carlos

    Friday, January 21, 2011 1:06 AM

All replies

  • Anybody from Microsoft want to comment on this, please?

    Carlos

    Monday, January 24, 2011 4:28 PM
  •  Yes helping out a client with the same problem.  Can call the PSI to get the project data set, check out the project but on queueupdateProject all of a sudden we get a faultexception related to mscorlib but no specific details - just 'unhandled communication fault.'

    This is MOPS 2010

    Trying to use the writeFaultOutput and getPSIClientError routines from msdn throw a null exception so can't get any more details onthis.  Below are some details that we write to the event log

     

    . About to update and publish  : ex.Message: Unhandled Communication Fault occurred/nex.Source: mscorlib/nex.StackTrace:

    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 SvcProject.Project.QueueUpdateProject(Guid jobUid, Guid sessionUid, ProjectDataSet dataset, Boolean validateOnly)

       at SvcProject.ProjectClient.QueueUpdateProject(Guid jobUid, Guid sessionUid, ProjectDataSet dataset, Boolean validateOnly)

       at fab.epc.ProjectPublishedEH.OnPublishedEH.callUpdateCFs()

    ex.GetType: System.ServiceModel.FaultException

    ex.GetBaseException.Inner:

    ex.GetBaseException.Message: Unhandled Communication Fault occurred

    ex.GetBaseException().Source: mscorlib

     


    Ray Letts Arbutus Solutions
    Thursday, May 5, 2011 3:57 PM
  •  This now seems to be size related.  Projects with small templates work. So publishing/uupdating the large dataset fails maybe because of size.... We dug into the error code and got this

    XML ELEMENT NAME : string

    XML ELEMENT VALUE: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

     

    RAW INNERTEXT    :

    The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

     

     

    So will try to up the size value for the WCF protocol as per this message.

    http://wgao.blogspot.com/2008/02/datacontractserializermaxitemsinobjectg.html

     


    Ray Letts Arbutus Solutions
    Friday, May 6, 2011 5:31 PM
  • I've got the same exception occuring from time to time. The strange thing about it is that the error appears exactly on executing the "QueueUpdateProject" in a WCF. And it seems to happen with one or two project only. Interesting is that I started getting this exception this week - the solution is working around 6 months now :-) My event log message:

     

     

     

    Project.UpdateProject()

    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 SvcProject.Project.QueueUpdateProject(Guid jobUid, Guid sessionUid, ProjectDataSet dataset, Boolean validateOnly)

       at SvcProject.ProjectClient.QueueUpdateProject(Guid jobUid, Guid sessionUid, ProjectDataSet dataset, Boolean validateOnly) in D:\TFS 03\ProjectServerAX\KM.EPM.WCF-01\KM.EPM.MSPBase\wcf.Project.cs:line 32115

       at KM.EPM.MSPBase.ProjectBase.ProjectServer_Update(ProjectData updateProject, Boolean afterCreate, Guid newProjGuid, String& method_error) in D:\TFS 03\ProjectServerAX\KM.EPM.WCF-01\KM.EPM.MSPBase\ProjectBase.cs:line 763

    GetPSClientError() returns null: The FaultException e is not a ServerExecutionFault.

    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 SvcProject.Project.QueueUpdateProject(Guid jobUid, Guid sessionUid, ProjectDataSet dataset, Boolean validateOnly)

       at SvcProject.ProjectClient.QueueUpdateProject(Guid jobUid, Guid sessionUid, ProjectDataSet dataset, Boolean validateOnly) in D:\TFS 03\ProjectServerAX\KM.EPM.WCF-01\KM.EPM.MSPBase\wcf.Project.cs:line 32115

       at KM.EPM.MSPBase.ProjectBase.ProjectServer_Update(ProjectData updateProject, Boolean afterCreate, Guid newProjGuid, String& method_error) in D:\TFS 03\ProjectServerAX\KM.EPM.WCF-01\KM.EPM.MSPBase\ProjectBase.cs:line 763


    http://www.icb.bg
    Tuesday, May 17, 2011 2:35 PM
  • I've been battling with a similar issue.  If you feel that the problem is in fact size related, you can always try only saving the ProjectDataSet's changes when you call QueueUpdateProject:

    dsProject = (ProjectDataSet)dsProject.GetChanges();

    I was getting the same error message when I tried to publish changes via the PSI to large projects and this did the trick for me.

    Thursday, July 21, 2011 5:32 PM
  • Completely agree with Ray Letts, I have faced the same issue at customer place, for the BIG Project with more then 2k or 3k lines....

    But the question i ask to my self is , is it related to the PSI can not process more then 1000 rows at a time..!!?

     


    Thanks, Parth
    Friday, July 22, 2011 5:26 AM
  • I have also seen the projects which i was publishing has some popups in the MSP for some REsources which are inactive..this i have noticed once i wrote the VBA code for the same...and i feel that can be the potential reason for the same...
    Thanks, Parth
    • Proposed as answer by Parth Rawal Thursday, July 28, 2011 4:42 AM
    Thursday, July 28, 2011 4:42 AM
  • I encountered the same problem while working with a large project plan. QueueUpdateProject seems to fail on me when the project dataset is over a few hundred lines. I tried to increase all the binding settings (WCF) but that didn't help. Sean Panter's code line did the trick. I managed to update 5100 lines, a 22MB plan (monitored with Fiddler). 

    I still don't know the drawbacks of this and whether there is another way to get the result.


    Independant SharePoint Consultant. Feel free to contact me. Blog: http://www.sharepoint.bg/radi Twitter: @RadiAtanassov
    Thursday, August 11, 2011 5:35 PM