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

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -