Hello,
I have C# WPF application in which I would like to check whether TFTP server which is running in another machine is running or not.
How to do it in C#? Please help me.
I have similar requirement for FTPServer. But I have implemented for FTPServer as below:
private bool isValidConnection(string url, string user, string password)
{
try
{
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(url);
request.Method = WebRequestMethods.Ftp.ListDirectory;
request.Credentials = new NetworkCredential(user, password);
request.GetResponse();
}
catch(WebException ex)
{
return false;
}
return true;
}
Now I would like to check for TFTP Server is running or not?
Best Regards,
Hari