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: 800706ba.

Any ideas what might be causing this?


回答1:


Turns out the problem can be fixed by adding an appropriate rule in the Firewall:

  • rule type: inbound
  • rule type: custom
  • program: %systemroot%\system32\dllhost.exe
  • protocol: TCP
  • local port: RPC Dynamic Ports
  • remote port: All Ports
  • action: allow connection
  • profile: domain

The above solution was inspired by this thread: Windows Firewall blocking OAB connections.



来源:https://stackoverflow.com/questions/21092050/comexception-when-trying-to-get-application-pools-using-servermanager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!