remote-administration

COMException when trying to get application pools using ServerManager

妖精的绣舞 提交于 2019-12-22 08:42:24
问题 When I try to get the list of IIS application pools from a remote server using the following code List<ApplicationPool> appPools; using (ServerManager serverManager = ServerManager.OpenRemote("XXX")) { appPools = serverManager.ApplicationPools.ToList(); } I get an exception: System.Runtime.InteropServices.COMException (0x800706BA): Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} from machine XXX failed due to the following error: