locked
Confused with conflicts handling RRS feed

  • Question

  • Hi,

    I'm using the sync framework to synchronize both a DB and an Exchange server. Both side are using a custom provider.

    When a conflict occurs (a change was made on the same record on both sides), I want the Db record to win. That means I would like the changes of the Db record to be applied on Exchange, and that's all. I don't want the changes from Exchange to be applied on the Db.

    So I've setup the providers with the following:

    agent.Direction = SyncDirectionOrder.UploadAndDownload;
    agent.LocalProvider = dbProvider;
    agent.RemoteProvider = exchangeProvider;
    
    exchangeProvider.Configuration.ConflictResolutionPolicy = ConflictResolutionPolicy.SourceWins;

    But when I launch the sync with a conflict, changes are applied on both providers. That means the SaveItemChange of the ExchangeProvider is called with the change of the db, and vice-versa, the SaveItemChange method of the DbProvider is called with the change from Exchange.

    The result is that I still have 2 different records on both sides, not in sync.

    Is it normal? How can I reach my scenario?

    I'm still using sync framework 2.0, but I've tried the 2.1 and the behavior is the same.

    Thanks for your help,

    Alex


    Wednesday, July 8, 2015 4:57 PM