none
System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.

    Question

  • I recently learn that "Database SyncSQL Server and SQL Express N-Tier with WCF" source ,it worked good in localhost,  but when published to the internet server's iis and execute Synchronize(), throw the exception  is as follow,hope every colleague is generous with your criticism:

    System.ServiceModel.CommunicationObjectFaultedException: The communication objec
    t, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication
     because it is in the Faulted state.

    Server stack trace:
       at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen(
    )
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
    eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan tim
    eout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCall
    Message methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
    Msg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
    ta, Int32 type)
       at WebSyncContract.IRelationalSyncContract.EndSession()
       at WebSyncContract.RelationalProviderProxy.EndSession(SyncSes
    sionContext context) in d:\WebSyncContr
    act\WebSyncContract\RelationalProviderProxy.cs:line 66
       at Microsoft.Synchronization.KnowledgeProviderProxy.EndSession(ISyncSessionSt
    ate pSessionState)
       at Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTI
    ON_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(Syn
    cIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, Knowledg
    eSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCa
    llbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAd
    apter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32&
     changesApplied, Int32& changesFailed)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(
    SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncP
    rovider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied,
     Int32& changesFailed)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize()
       at Microsoft.Synchronization.SyncOrchestrator.Synchronize()
       at WebSyncClient.SynchronizationHelper.SynchronizeProviders(K
    nowledgeSyncProvider localProvider, KnowledgeSyncProvider remoteProvider) in d:\
    WebSyncClient\SynchronizationHelper.cs:
    line 33
       at ConsoleInit.Program.Sync() in d:\
    ConsoleInit\Program.cs:line 126
       at ConsoleInit.Program.Main(String[] args) in d:\Projects\CYX
    .SyncToolkit\ConsoleInit\Program.cs:line 34

    Related Links:http://social.msdn.microsoft.com/Forums/zh-CN/wcfzhchs/thread/cce7a77f-9997-4481-ba34-526c6ab32c36/#fe075a58-8ecd-4fbb-87a4-9dd96ad2ec79




    Tuesday, May 21, 2013 3:20 AM

Answers

  • i suggest you enable WCF tracing to get the exact error on the WCF service side...
    • Marked as answer by Dozingowl Thursday, May 23, 2013 9:06 AM
    Tuesday, May 21, 2013 11:26 AM
    Moderator

All replies

  • i suggest you enable WCF tracing to get the exact error on the WCF service side...
    • Marked as answer by Dozingowl Thursday, May 23, 2013 9:06 AM
    Tuesday, May 21, 2013 11:26 AM
    Moderator
  • JuneT,thank you very much!By tracing the exception I found cause of the problem.
    Thursday, May 23, 2013 6:42 AM