我有一個控制檯應用程序,它使用Microsoft.Web.Administration來遠程管理遠程服務器上的IIS(我使用過這Credentials for ServerManager.OpenRemote - 修改了ahadmin屬性,打開TCP端口135.我也使用模擬)。一切工作正常 - 我可以遠程創建站點和應用程序池等。ServerManager.OpenRemote錯誤80040154 ASP.NET MVC 4中的CLSID {2b72133b-3f5b-4602-8952-803546ce3344}
但是,當我試圖做同樣的事情在ASP.NET MVC應用程序4,我得到這個錯誤:
System.Runtime.InteropServices.COMException: Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} from machine "remoteServerIP" failed due to the following error: 80040154 "remoteServerIP".
我知道很多人得到這個錯誤,我看到很多帖子關於它,但沒有爲我工作。我嘗試將我的MVC應用程序切換到平臺目標X86(Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154),在遠程計算機上,我啓用了HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ CLSID {2b72133b-3f5b-4602-8952-803546ce3344}和HKEY_CLASSES_ROOT \ CLSID {2b72133b-3f5b- 4602-8952-803546ce3344}爲我用來模擬的帳戶。 這個問題似乎是在MVC和控制檯應用程序之間的一些區別,但我無法弄清楚它是什麼。
我在Windows 7 x64,遠程服務器 - Windows Server 2008 R2 x64上。兩臺機器都有IIS 7.5。
OMG非常感謝你!這讓我瘋狂! – 2016-06-28 21:18:03
同樣的問題,但與.net核心microsoft.web.administration包認爲它是正確的使用 – Ewan 2018-02-23 12:23:36