locked
Custom provider - Items are transfered twice within a Sync session RRS feed

  • Question

  • Hi,

    I have a problem where items are pushed across the sync sesion one too many times.

    This is what the main sync code looks like.
                MySyncProviderOU outlookP = new MySyncProviderOU("OutlookP", "OutlookP1");
    MySyncProviderSP sharepointP = new MySyncProviderSP(lService, listName,"sharepointP", "sharepointP1");

    SyncOrchestrator agent = new SyncOrchestrator();
    agent.LocalProvider = outlookP;
    agent.RemoteProvider = sharepointP;

    agent.Direction = SyncDirectionOrder.Upload;
    agent.Synchronize();


    agent.Direction = SyncDirectionOrder.Download;
    agent.Synchronize();
    The thing is that if i for eg. have three new entries in Outlook, then these three items will be uploaded during the first part of the sync session, just as planned,
    but  the same three items are later detected as new entries on the remote provider and then again downloaded to the local provider where they already exist.
    This causes some serious issues.
    I hope my questions isn´t too confusing.

    I appreciate your help!

    • Moved by Max Wang_1983 Thursday, April 21, 2011 5:23 PM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Monday, April 13, 2009 11:54 PM

Answers

  • Hi, guys

    Thanks for the answers, It was a screwup on my part, i didn´t set the ChangeVersion correctly.
    Thanks again
    • Marked as answer by gocca1 Saturday, May 16, 2009 11:30 PM
    Saturday, May 16, 2009 11:30 PM

All replies

  • Hey,

    For the 2nd download sync session (from SharePoint to Outlook), it looks like the SyncProvider for sharepoint has some issues in its change enumeration logic and detected those changes from OutLook as new to Outlook. Could you please look into the code of your sharepoint provider and make sure the change enumeration logic is correct?

    Thanks,
    Ann Tang
    Tuesday, April 14, 2009 5:58 PM
  • A few clarifying questions so I can try and provide some guesses/things to check:

    Are you writing a knowledge provider or a simple provider?
    Is the redundant transfer in the same direction as the original transfer of the three items or the opposite direction?

    Lukasz
    Friday, April 17, 2009 7:24 PM
  • Hi -

    Adding to the questions already asked by Lukasz and Ann above - did you ensure that when you apply a change you give it the changeversion that came through on the ItemChange and did not create a new ChangeVersion?

    Thanks
    Deepa


    Deepa ( Microsoft Sync Framework)
    Tuesday, May 12, 2009 8:41 PM
    Answerer
  • Hi, guys

    Thanks for the answers, It was a screwup on my part, i didn´t set the ChangeVersion correctly.
    Thanks again
    • Marked as answer by gocca1 Saturday, May 16, 2009 11:30 PM
    Saturday, May 16, 2009 11:30 PM