【发布时间】:2020-03-12 11:04:46
【问题描述】:
我想在 .net core 2.2 中监控远程机器进程的内存使用情况。 我的应用程序将在 Intranet 中运行并检查远程计算机 CPU 使用情况、进程的内存使用情况。开发自己的应用程序性能监控应用程序。
尝试使用 System.Diagnostics 的 'Process' 类,但得到 System.InvalidOperationException: 'Couldn't connect to remote machine.' 错误消息。使用机器名称,但得到相同的错误。
Process[] remoteByName = Process.GetProcessesByName("notepad", "\\192.168.3.114");
或
Process[] remoteByName = Process.GetProcessesByName("notepad", "192.168.3.114");
- 找不到任何接受用户名和密码来访问远程机器的方法。这种方法可用吗?
- 需要关闭远程机器防火墙吗?
- 还有其他方法可以在 .net core 中访问远程机器的进程吗?
【问题讨论】:
-
请检查Remote Registry服务是否在远程机器上运行。另外,使用
xxx.xxx.xxx.xxx,不以`\`开头。 -
是的,我已经尝试过,但得到 UnauthorizedAccessException: Access to the registry key '230 232' is denied 错误。
-
@ParthAkbari,你能用远程电脑的用户名和密码吗,如果是的话,几个月前我有一种方法。
标签: c# .net-core asp.net-core-2.0 remote-access