none
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