locked
Microsoft.syncronization working on X64, give errors on X86, why? RRS feed

  • General discussion

  • I manage to sync 2 databases with Microsoft sync framework, only on vb projects on X64, when I am trying to syncronize 2 databases in projects X86 I receive errors, like this one:

    An unhandled exception of type 'Microsoft.Synchronization.SyncException' occurred in Microsoft.Synchronization.dll Additional information: Retrieving the COM class factory for component with CLSID {EC413D66-6221-4EBB-AC55-4900FB321011} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

    The code which I use for sync is:

    Public Sub ExecSync(csServer As String, csClient As String)
            Dim clientConn As New SqlConnection(csClient)
            Dim serverConn As New SqlConnection(csServer)
            Dim syncOrchestrator As New SyncOrchestrator() With {.RemoteProvider = New SqlSyncProvider("MySyncScope", serverConn, Nothing, Nothing), .LocalProvider = New SqlSyncProvider("MySyncScope", clientConn, Nothing, Nothing), .Direction = SyncDirectionOrder.DownloadAndUpload}
            AddHandler CType(syncOrchestrator.LocalProvider, SqlSyncProvider).ApplyChangeFailed, AddressOf Program_ApplyChangeFailed
            syncOrchestrator.Synchronize()
    End Sub
    

    the eroor is here:

    syncOrchestrator.Synchronize()

    Why this code is working on a X64 platform and not running on X86 platform?

    I use the following references:

    C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.1\Runtime\x86\Microsoft.Synchronization.dll

    C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.1\Runtime\ADO.NET\V3.1\x86\Microsoft.Synchronization.Data.dll

    C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.1\Runtime\ADO.NET\V3.1\x86\Microsoft.Synchronization.Data.SqlServer.dll

    With this references the code is working very well on X64 application and give errors on X86 applications.

    Someone please, HELP...!!!

    PS. Any CPU and X86 projects give the above error. X64 is working fine. 

    On my machine I have X64, and if is important my SQL Server is X64.

    • Changed type iLucian Tuesday, June 30, 2015 6:20 PM Hope someone to answer
    • Moved by Youjun Tang Wednesday, July 1, 2015 9:14 AM more appropriate
    Tuesday, June 30, 2015 1:07 PM

All replies

  • Hello,

    You might consider asking your question in the following forum

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=syncdevdiscussions&filter=alltypes&sort=lastpostdesc


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.

    Tuesday, June 30, 2015 1:43 PM
  • You need to install the proper version of Sync Framework. 64bit or 32bit according to your machine
    Friday, July 3, 2015 8:24 AM
  • I install on my macine Sync-SDK-v2.1-x64-ENU, my machine has Windows 7 professional x64. I must use Microsoft sync framework x64 to produce my dll for x86?
    Friday, July 3, 2015 9:33 PM
  • You need to install the proper Sync Redistributable package according to the machine architecture that will run you program.
    Tuesday, July 7, 2015 1:00 PM