0

我在x64平臺上的ASP MVC 3下創建應用程序,並嘗試使用MS同步框架2.1來同步MS SQL Express和MS SQL Compact 3.5 SP2數據庫。 客戶端和服務器應該通過WCF服務進行同步。 我有來自Sync SDK與WCF示例的示例。Asp Mvc 3和同步框架2.1

我想通過點擊網頁來實現同步。其實我創建控制檯應用程序,其中由WCF同步運行良好。但是當我嘗試做下ASP MVC 3相同的邏輯方法同步類SyncOrchestrator回報例外:

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)). System.Runtime.InteropServices.COMException (0x80040154): 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)). at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAdapter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32& changesApplied, Int32& changesFailed)

據我所知的原因是x64和x86平臺之間的情況。但是在我所有的解決方案中,我都使用了與Sync Framework 2.1相同的參考。和解決方案在控制檯應用程序下工作,但不在Web中。

是否有人知道我的錯誤?可能是我需要一些特別的東西嗎?

回答

1

您是否使用Sync Framework的32位安裝?如果是的話,如果啓用32位應用程序設置爲True,您可能需要檢查您的MVC應用程序正在運行的IIS應用程序池。

+0

感謝JuneT,但我嘗試在Visual Studio - ASP.Net Developer服務器下運行。可以管理開發人員服務器嗎?附:我上傳我的應用程序到本地IIS,但它仍然有問題:( –