简体   繁体   English

如何使用 C # 从另一台服务器远程管理 IIS?

[英]How can I manage IIS remotely from another server using C #?

How can I manage IIS remotely from another server using C #?如何使用 C # 从另一台服务器远程管理 IIS?

ServerManager.OpenRemote("ServerName");

I need an example of ServerName format in above snippet code我需要上面代码段中的 ServerName 格式示例

I tried this example with "localhost" parameter but did not return any value我用“localhost”参数尝试了这个例子,但没有返回任何值

You need to ensure that you have enough administration privilege to access the remote IIS, such as Firewall is disabled on both the server.您需要确保您有足够的管理权限来访问远程 IIS,例如在两个服务器上都禁用了防火墙。 The logon user is domain\administrator.登录用户是域\管理员。

This link also provide some configuration to enable the DCOM:该链接还提供了一些启用 DCOM 的配置:

Credentials for ServerManager.OpenRemote ServerManager.OpenRemote 的凭据

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM