Click here to Skip to main content
15,896,497 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all

I am getting this error when synchronizing two databases.

Microsoft.Synchronization.ReplicaNotFoundException: Replica with the specified key was not found


C#
SyncOrchestrator orchestrator = new SyncOrchestrator();
            orchestrator.LocalProvider = localProvider;
            orchestrator.RemoteProvider = remoteProvider;
            orchestrator.Direction = SyncDirectionOrder.UploadAndDownload;

            //progressForm = new ProgressForm();
            //progressForm.Show();

            //Check to see if any provider is a Sql provider and if it needs schema
            CheckIfProviderNeedsSchema(localProvider as SqlSyncProvider);
            
            CheckIfProviderNeedsSchema(remoteProvider as SqlSyncProvider);

            SyncOperationStatistics stats=null;
            try
            {
                stats = orchestrator.Synchronize();
            }
            catch (Exception ee)
            {
            }
            //progressForm.ShowStatistics(stats);
            //progressForm.EnableClose();
            return stats;
Posted
Updated 29-Jun-11 3:51am
v2
Comments
Dave Kreskowiak 29-Jun-11 19:46pm    
What kind of databases are you synchronizing?? SQL Server? What are the contents of localProvider? remoteProvider?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900