c# - Is there a way to check if RDP connection possible? -
i have home server, , want create manager wake computer , check if rdp connect possible.
i accomplished wol behavior, there problem checking if computer os turned on , ready rdp connections.
is possible 'ping' rdp?
you can check if can connect rdp port (by default 3389):
static bool isrdpavailable(string host) { try { using (new tcpclient(host, 3389)) { return true; } } catch { return false; } }
usage:
bool available = isrdpavailable("your_server_ip_or_name");
Comments
Post a Comment