locked
System.Exception: There is a sync session already in progress, please try again later RRS feed

  • Question

  •  

    hi All
    i am getting same error while executing  syncOrchestrator.Synchronize(); line.

    public
    void DoSync()

    {

     

    if (isSyncInProgress)

    {

    syncAgain =

    true;

    System.Diagnostics.

    Trace.WriteLine("Sync queued.");

    }

     

    else

    {

    isSyncInProgress =

    true;

     

    bool done = false;

     

    while (!done)

    {

    syncAgain =

    false;

    hadErrors =

    false;

    skippedItems.Clear();

     

    foreach (ProviderPair pp in providerPairs)

    {

     

    if (!pp.Local.IsProviderAvailable || !pp.Remote.IsProviderAvailable)

    {

     

    return;

    }

    syncOrchestrator.LocalProvider = pp.Local;

    syncOrchestrator.RemoteProvider = pp.Remote;

    //Exception occur here
    syncOrchestrator.Synchronize();

     

    if ((pp.Local.SkippedItems.Count > 0) || (pp.Remote.SkippedItems.Count > 0))

    {

    skippedItems.AddRange(pp.Local.SkippedItems);

    skippedItems.AddRange(pp.Remote.SkippedItems);

    }

    }

    done = !syncAgain;

    }

    }

    isSyncInProgress =

    false;

    }
    any help would be appreciated.
    thanks in advance

    Thanks
    Urvi Mehta

    • Moved by Max Wang_1983 Wednesday, April 20, 2011 9:49 PM Forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Friday, November 20, 2009 5:51 AM

Answers

All replies

  • Make Sure the syncorchestrator.State is Ready before calling Synchronization() again
    Saturday, November 21, 2009 12:12 AM
    Moderator
  • hi 
    syncorchestrator.State = ready it will show. still same error.
    i am working on sample provided by microsoft itself without any change in code..
    please help me.

    Thanks
    Urvi Mehta
    Monday, November 23, 2009 5:44 AM
  • Hi Urvi, can you point me to the sample you are using? I will take a look.
    Tuesday, November 24, 2009 2:10 AM
    Moderator
  • Hi Sid,
    First sorry for late reply.
    Sample which i am going to run is available over here.

    http://code.msdn.microsoft.com/sync/Release/ProjectReleases.aspx?ReleaseId=613

    In this MsfProviderSampleCode open this folder and open project . There are multiple projects in this set MsfSample.csproj as start up project.

    Here I am getting error as i have already discussed in above thread.

    Please Help me

    Thanks in Advance
    Urvi Mehta

    Tuesday, December 1, 2009 6:35 AM
  • I see - you are trying to run the Outlook Contact sync sample. Have you installed Sync Framework 1.0 or 2.0 on your machine? I assume you have installed Sync Framework 1.0, since this sample was built against 1.0?

    The Sync Framework version 2.0 has now been released, so if you are just starting to develop or evaluate, I would recommend trying that out.

    We haven't updated the Contact sync sample to work against 2.0, because for 2.0 we have built a number of simpler samples that demonstrate a number of Sync Framework features in a better way.

    The 2.0 SDK and samples are here: The SDK has some Sync101 samples in the box as well.

    http://www.microsoft.com/downloads/details.aspx?FamilyID=89adbb1e-53ff-41b5-ba17-8e43a2e66254&displaylang=en

    http://services.community.microsoft.com/feeds/feed/syncdemo
    Tuesday, December 1, 2009 6:14 PM
    Moderator