my requirement is to update the down server host with other available server name in a table in db. This record will be used a windows service which installed on all the servers on the network to run a scheduled task. need help to get server host name which is down on a network i tried using ping, tcpclient and WMI and everytime when a server is down on my network getting below error:
Message: GetDataBaseHandleWithAccess - INNER Exception:System.ComponentModel.Win32Exception (0x80004005): The RPC server is unavailable
Message: GetDataBaseHandleWithAccessServer Health CheckupSystem.InvalidOperationException: Cannot open Service Control Manager on computer 'VW144444'. This operation might require other privileges. ---> System.ComponentModel.Win32Exception: The RPC server is unavailable --- End of inner exception stack trace ---
below are link which i referred and tried detect-if-machine-is-online-or-offline-using-wmi-and-c-sharp
csharp-check-if-machine-is-online-or-offline: using Ping Service