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