locked
"An incorrect conflict resolution action was set on the OnConflict callback" RRS feed

  • Question

  • Hi,

    I am using Microsoft Sync Framework 2.1, to syncronize files between local storage and a remote storage (over a REST api).    For local storage I am using FileSyncProvider class which comes with the Sync Framework.

    The problem I am having is in the conflict resolution.  In some cases I want to Skip a conflict or Save it, however when I set 

     e.SetResolutionAction(ConflictResolutionAction.SkipChange) or  e.SetResolutionAction(ConflictResolutionAction.SaveConflict) in DestinationCallbacks_ItemConflicting(object sender, ItemConflictingEventArgs e) event ... it throws the following error:

    Microsoft.Synchronization.SyncException: An incorrect conflict resolution action was set on the OnConflict callback. ---> System.Runtime.InteropServices.COMException: An incorrect conflict resolution action was set on the OnConflict callback.
       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)
       --- End of inner exception stack trace ---
       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()

    Any ideas how to skip a change that's conflicting?

    Friday, November 20, 2015 2:16 PM