locked
Problem with sync NTFS and files .sync RRS feed

  • Question

  •  

    Hi, I'm new in this domain of sync framework and I'm working about a project of synchronism of data table and files...

     

    Now i'm implementing a pert of File system and occasionally I have this exception:

     

    "Values does not fall within the expected range." in the line of code "syncAgent.Synchronize()" .

    Down you can see the method were it's called...

     

    public void Synchronize(KnowledgeSyncProvider destinationProvider, KnowledgeSyncProvider sourceProvider, uint batchSize, string scopeName)

    {

    // Configura la grandezza del batch in ogni provider

    ((MyStore)destinationProvider).RequestedBatchSize = batchSize;

    ((MyStore)sourceProvider).RequestedBatchSize = batchSize;

    //Decido chi va a vincere nei conflitti

    destinationProvider.Configuration.ConflictResolutionPolicy = ConflictResolutionPolicy.SourceWins;

    sourceProvider.Configuration.ConflictResolutionPolicy = ConflictResolutionPolicy.SourceWins;

    // Creo la sessione di sync

    SyncOrchestrator syncAgent = new SyncOrchestrator();

    syncAgent.LocalProvider = destinationProvider;

    syncAgent.RemoteProvider = sourceProvider;

    //scelgo la direzione di sync

    syncAgent.Direction = SyncDirectionOrder.Upload;

    //sincronizza

    syncAgent.Synchronize();

     

    This situation occur frequently, not costantly with an action... Always it occur when I touch a file or a folder in the destination path...

     

    I search this problem in the forums but it's generally with more kind of situations and contest...

     

    It's an error occurred by my fault in any part of mi entire solutions or is a bug of the version beta in the Microsoft sync Framework?

     

    Someone have a idea of the problem, can you help me... please...

     

    I hope you have understand because I dont speak so good the English language...

     

    thanks in advanced

     

    Iron

    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:10 PM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Tuesday, April 15, 2008 10:24 AM

Answers

All replies

  • Hi Iron,

     

    Could it be that you have invalid ID formats or your items have not been correctly enumerated? (Can you provide a stack trace?)

     

    I'd really recommend you get started with the easier to follow Sync 101 sample to understand the patterns the Sync Framework expects from endpoints plugging into the system (change detection, enumeration, conflict detection, resolution, etc)

     

    https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=615 

     

    -Moe

     

    Wednesday, April 16, 2008 5:06 AM
  • Hi,

     

    I try to ricreate the problem, but in this moment I don't arrive... for see a stack trace.

     

    About "have invalid ID formats or your items have not been correctly enumerated" i thing so not, because this problem don't get out regulary but after many operation in the folder (delete, rename, modify the contain, ...).

     

    The project, is based by a sample of Microsoft called "ManagedNTFSSample" and i modify the part to aggregate a windows with the WPF technology.

     

    The sample then you reccomend me i have seen and study how it work... (in the limit of my capacity) and i thing then It's not my case; maybe I mistake, but I study more this sample....

     

    Thanks

     

    Iron

     

     

    Wednesday, April 16, 2008 3:40 PM