SessionProgress 1,15,55,100 RRS feed

  • Question

  • Hello,


    sorry to ask again, but I am experiencing only very rough values regarding the progress of the sync. I am using the code:


    public void DisplaySessionProgress(object sender, EventArgs e)


    StringBuilder outputText = new StringBuilder();

    if (e is SessionProgressEventArgs)


    SessionProgressEventArgs args = (SessionProgressEventArgs)e;

    outputText.Append("Percent complete: " + args.CompletedWork + " (" + args.TotalWork + ")");




    outputText.AppendLine("Unknown event occurred");






    which is connected in:


    public CustomSyncAgent(bool syncAll)



    SampleStatsAndProgress sampleStats = new SampleStatsAndProgress();  // this is a sample class from the MS Doc.

    // this below did not work see previous post

    //this.StateChanged += new EventHandler<SessionStateChangedEventArgs>(sampleStats.DisplaySessionProgress);

    this.SessionProgress += new EventHandler<SessionProgressEventArgs>(sampleStats.DisplaySessionProgress);



    The output window shows only values in the steps: 1 (100),15 (100) ,55 (100) ,100 (100)  (values for args.CompletedWork(args.TotalWork) 


    This would be a very nice feature for a progressbar so how can I make it work to show reasonable values.





    • Moved by Max Wang_1983 Friday, April 22, 2011 8:50 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, February 5, 2008 10:51 AM

All replies

  • the status form the syncagent.sessionProgress event only shows you schema initalization time - 15, upload time -55, and download time -100. you can hook up to the clientprovider or server provider's syncprogress event to get the details for the sync if you real need. please be noticed that this will affect the sync performance.




    Wednesday, February 6, 2008 2:22 AM
  • Hello Yunwen,


    thank your for your response. Could you please double check your answer. The Docu says:

    SessionProgressEventArgs Properties
    [This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

      Name Description
    CompletedWork Gets the amount of work completed in the session so far.
    TotalWork Gets the total work for the session.


    The sessionProgress event is fired many times repeating the same values 1,15,55,100. If I have a lot of changes to synchronize or almost nothing does not make any difference to the output.


    I am using Ado.Net Sync Services from CTP1 Refresh of Sync Framework.

    Wednesday, February 6, 2008 2:44 PM
  • Hi Tom,


    could you please post your code nippet here ? something doesn't seem to be right if you see repeated values of the status.




    Saturday, February 9, 2008 12:17 AM