Best way to check if FTP is online/offline
Hi, what is the best way to determine if a ftp server is online or offline in vb
i have tried many different ways of pinging the ftp server, for example:
Code:
Dim objPing As New Ping()
Try
Dim objReply As PingReply = objPing.Send("ftp://servername.com/", 1000)
If objReply.Status = IPStatus.Success Then
Label1.Text = String.Format("<b>Success</b> - IP Address:{0} Time:{1}ms", objReply.Address, objReply.RoundtripTime)
Else
Label1.Text = objReply.Status.ToString()
End If
Catch ex As Exception
Label1.Text = ex.Message
End Try
But whatever i try i get this error: "An exception occurred during a Ping request."
Re: Best way to check if FTP is online/offline
There is no point in doing a ping before Trying the FTP request.