Receiving XML error when using Microsoft Sync Framework RRS feed

  • Question

  • I am using Microsoft Sync Framework to sync two databases, one SQL Server, the other SQL Server Compact (SQL Server CE).

    I have two SQL Servers running, when I perform the sync with one server (version 12.0.4213.0), everything seems to work normally. With the 2nd server (version 11.0.6020.0), I get an error 

    > Update process encountered an error: There is an error in XML document (1, 2)

    And some more detailed error information:

    > [System.InvalidOperationException] = {System.InvalidOperationException: <SqlCeSyncProviderScopeConfiguration xmlns=''> was not expected.  
    > at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSqlSyncProviderScopeConfiguration.Read7_Item()

    > System.InvalidOperationException: There is an error in XML document
    > (1, 2). ---> System.InvalidOperationException:
    > SqlCeSyncProviderScopeConfiguration xmlns='' was not expected.

    Now to which XML document it is referring, I do not know. There are no XML files accessed explicitly while using this framework.

    This error happens on the call to `Synchronize`, the code in that function is:

        public int Synchronize() {
            List<SyncOperationStatistics> syncStats = new List<SyncOperationStatistics>();

            SyncOrchestrator syncOrchestrator = new SyncOrchestrator();
            syncOrchestrator.Direction = SyncDirectionOrder.Download;

            foreach (var scopeName in ScopeNames) {
                    syncOrchestrator.LocalProvider = new SqlCeSyncProvider(scopeName, DB_SqlCeConnection);
                    syncOrchestrator.RemoteProvider = new SqlSyncProvider(scopeName, DB_SqlConnection);

                    ((SqlCeSyncProvider)syncOrchestrator.LocalProvider).ApplyChangeFailed += new EventHandler<DbApplyChangeFailedEventArgs>(Program_ApplyChangeFailed);
                    ((SqlSyncProvider)syncOrchestrator.RemoteProvider).ApplyChangeFailed += new EventHandler<DbApplyChangeFailedEventArgs>(Remote_ApplyChangeField);

                    SyncOperationStatistics syncStat = null;

                    syncStat = syncOrchestrator.Synchronize();


            return syncStats.Count;

    Edit: I have since updated the non-functioning server to the exact same version as the one that syncs properly. I still receive the same error, only with the 1 server..

    • Moved by Bob Beauchemin Wednesday, July 13, 2016 6:07 PM Moved to sync framework-specific forum for best results
    • Edited by YLNK9000 Wednesday, July 13, 2016 6:22 PM
    Wednesday, July 13, 2016 2:01 PM