Microsoft.Synchronization.Data.DbSyncException:无法枚举 table 的 RelationalSyncProvider 中的更改

Microsoft.Synchronization.Data.DbSyncException: Cannot enumerate changes at the RelationalSyncProvider for table

我正在使用 MS Sync 框架 2.1,使用 sql 服务器 2008 作为客户端,使用 sql 服务器 2012 作为服务器端。

有时我会低于错误

Microsoft.Synchronization.Data.DbSyncException: Cannot enumerate changes at the RelationalSyncProvider for table 'MyTable'. Check the inner exception for any store-specific errors. ---> System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'ISyncKnowledge'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{615BBB53-C945-4203-BF4B-2CB65919A0AA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease) at Microsoft.Synchronization.CoreInterop.ISyncKnowledge.Clone() at Microsoft.Synchronization.SyncKnowledge.Clone() at Microsoft.Synchronization.Data.RelationalSyncProvider.GetRowEnumerationState(DbDataReaderHandler readerHandler, SyncKnowledge knowledgeToCompare) at Microsoft.Synchronization.Data.RelationalSyncProvider.EnumerateChangesInBatchesInternal(Object batchProducer) --- End of inner exception stack trace --- at Microsoft.Synchronization.Data.DbSyncBatchProducer.DequeueBatch() at Microsoft.Synchronization.Data.RelationalSyncProvider.ConsumeBatchFromProducer(DbSyncScopeMetadata scopeMetadata) at Microsoft.Synchronization.Data.RelationalSyncProvider.GetChanges(DbSyncScopeMetadata scopeMetadata, DbSyncSession DbSyncSession, UInt32 memoryBatchSize) at Microsoft.Synchronization.Data.RelationalSyncProvider.GetChangeBatch(UInt32 batchSize, SyncKnowledge destinationKnowledge, Object& changeDataRetriever) at Microsoft.Synchronization.KnowledgeProviderProxy.GetChangeBatch(UInt32 dwBatchSize, ISyncKnowledge pSyncKnowledge, ISyncChangeBatch& ppChangeBatch, Object& ppUnkDataRetriever) at Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics) at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAdapter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32& changesApplied, Int32& changesFailed) at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncProvider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed) at Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize() at Microsoft.Synchronization.SyncOrchestrator.Synchronize() at UNIVERSALCONSTRUCTION.Classes._cSynchronization.Synchronize(String _pScopeName, SyncDirectionOrder _pDirection) at SyncUtility.FrmSync._MSync() at SyncUtility.FrmSync.button1_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

此应用程序 运行 同时在三台不同的电脑上运行,在两台电脑上出现相同的错误,但一台电脑没有出错并且工作正常..

任何建议..如何解决这个问题..

此处内部异常。

{"Unable to cast COM object of type 'System.__ComObject' to interface type 'ISyncKnowledge'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{615BBB53-C945-4203-BF4B-2CB65919A0AA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."}

如果您在这些机器上安装了 SyncFx,请确保您的应用程序的目标平台与安装的 SyncFx 平台相匹配。

例如,SyncFx 的 x86 版本,您的应用也应针对 x86。