System.Exception: There is a sync session already in progress, please try again later
-
20 พฤศจิกายน 2552 5:51
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- ย้ายโดย Max Wang_Chinasoft 20 เมษายน 2554 21:49 Forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
ตอบทั้งหมด
-
21 พฤศจิกายน 2552 0:12ผู้ดูแลMake Sure the syncorchestrator.State is Ready before calling Synchronization() again
-
23 พฤศจิกายน 2552 5:44hi
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 -
24 พฤศจิกายน 2552 2:10ผู้ดูแลHi Urvi, can you point me to the sample you are using? I will take a look.
-
1 ธันวาคม 2552 6:35
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 -
1 ธันวาคม 2552 18:14ผู้ดูแล
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- ทำเครื่องหมายเป็นคำตอบโดย Mahesh DudgikarMicrosoft, Owner 7 ธันวาคม 2552 5:33