尝试使用ServerManager获取应用程序池时出现COMException [英] COMException when trying to get application pools using ServerManager

查看:243
本文介绍了尝试使用ServerManager获取应用程序池时出现COMException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用以下代码从远程服务器获取IIS应用程序池列表时

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();
}

我得到一个例外:

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?

推荐答案

结果可以通过在防火墙中添加适当的规则来解决该问题:

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

  • 规则类型:入站
  • 规则类型:自定义
  • 程序:%systemroot%\ system32 \ dllhost.exe
  • 协议:TCP
  • 本地端口:RPC动态端口
  • 远程端口:所有端口
  • 操作:允许连接
  • 个人资料:域

上述解决方案受此线程启发:

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

这篇关于尝试使用ServerManager获取应用程序池时出现COMException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆