In C# console application need to perform telnet utility and know whether the required port is open
var ping = new Ping();
var rply = ping.Send("192.168.1.117");
if (rply.Status == IPStatus.Success)
{
Console.WriteLine("up");
Console.WriteLine("Press any key to continue");
Console.ReadKey(true);
}
else
{
Console.WriteLine("down");
Console.WriteLine("Press any key to continue");
Console.ReadKey(true);
I am using above code to ping but for telnet and port how should i do it, so that in console application it should perform telnet utility and let the user know the required port is open
Generally speaking, server admins don’t like you connecting and then dropping (the only real way to see if a port is open). However, if you want to do it you can do: