Com Error when hosting n-tier sync service in IIS RRS feed

  • Question

  • Hi

    I've implemented n-tier sync over WCF services. Initially I hosted the service in the same application which was syncing and all worked file, the proxy synced with the service perfectly.

    I've now moved the service implementation to a WCF service hosted in IIS (inside another solution) and when the service gets called I'm getting the following COM error.

    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)).

    I've referenced the same SyncFramework DLLs (from "Program Files (x86)" folder), I've set the web application which is hosting the service to be x86.

    I should also say that I'm not using full IIS yet, just IIS Express as I'm still in development.

    I'm not sure what else to try.

    • Edited by Ben Crinion Tuesday, February 19, 2013 5:43 PM
    Tuesday, February 19, 2013 5:34 PM

All replies

  • have you installed Sync Framework on the IIS server?

    if you've installed already and you're running 64-bit IIS, go to the Application Pool properties of your WCF service and set Enable 32-bit applications.

    Tuesday, February 19, 2013 5:44 PM
  • I'm running both parts of the Sync on the same machine at the moment so Sync Framework is installed.

    I've set allow 32bit applications on the application pool but it's still throwing the COM exception. 

    Is it possible that only one application domain is allowed to be using the Sync framework components at the same time?

    Tuesday, February 19, 2013 6:06 PM
    • Edited by JuneT Tuesday, February 19, 2013 9:13 PM
    Tuesday, February 19, 2013 9:13 PM
  • Okay, it's suggesting that I need to force x64 and not use IIS express. If i force x64 then the RIA services for my web application don't build.

    As was recommended here http://social.microsoft.com/Forums/en-US/syncgeneral/thread/7d5d9163-c6d1-4ccb-b70b-24e4de864f28, I've tried installing the x86 version of SyncFX SDK along side the x64 version but it doesn't allow me to install as I "already have a newer version installed".

    I think my only option might be to host my sync services separately from my main web application. 

    Wednesday, February 20, 2013 11:07 AM
  • Actually another option would be to sync directly with the database in this scenario and remove all the WCF overhead.

    Lesson of the day for me is probably K.I.S.S.

    Wednesday, February 20, 2013 12:39 PM
  • you should only be forcing x64 if its really x64. if its in VS that you're getting an error, have you tried simply running on the VS web server?

    Wednesday, February 20, 2013 10:09 PM