0

我正在尝试连接到远程IIS 服务器并通过 C# 配置其站点。我为此操作使用了一个名为 ServerManager 的对象,这是我的代码:

ServerManager manager = new OpenRemote("10.1.2.23"); //IIS ip address
SiteCollection managerLst = manager.Sites;    

在第二行之后,我收到以下错误:

Retrieving the COM class factory for remote component with CLSID {2B72133B-3F5B-4602-8952-    803546CE3344} from machine 10.1.16.152 failed due to the following error: 80070005 10.1.2.23.

编辑: 在本地主机上尝试相同的代码时,该过程似乎运行良好我认为我的权限有问题,但我不知道如何通过 ServerManager 对象添加用户名和密码。

4

0 回答 0