软件编程
位置:首页>> 软件编程>> C#编程>> 详解WMI RPC 服务器不可用的解决方案

详解WMI RPC 服务器不可用的解决方案

作者:森大科技  发布时间:2023-09-14 14:51:54 

标签:WMI,RPC,服务器

本文介绍了详解WMI RPC 服务器不可用的解决方案,分享给大家,具体如下:


ConnectionOptions connectionOptions = new ConnectionOptions();
connectionOptions.Username = userName;
connectionOptions.Password = password;
ManagementScope managementScope = new ManagementScope("\\\\" + host + "\\root\\cimv2", connectionOptions);
try
{
 managementScope.Connect();
}
catch
{
}

 发生"RPC 服务器不可用"或者其它无法连接的情况下(确保连接本机没有问题)的解决方案:

1 检查远程服务器 “Remote Procedure Call”、“DCOM Server Process Launcher” 和 “DHCP Client”服务 是否开启

2  检查远程服务器 本地安全策略--本地策略--安全选项--网络访问:本地帐户的共享和安全模式--属性 选择:经典-本地用户以自己的身份验证

3  在远程服务器上,运行"netsh firewall set service RemoteAdmin".

0
投稿

猜你喜欢

手机版 软件编程 asp之家 www.aspxhome.com