question

BKHariprasad-2463 avatar image
0 Votes"
BKHariprasad-2463 asked saldana-msft edited

How to check TFTP server is running or not?

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

not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers