In C#, the session is connected to FTP server.
when comes to do directory listing using session.ListDirectory("/"), it keep stuck in the command looping and reconnect. I am sure the error is "NO Listing Directory".
this is because I set the FTP mode to passive and the firewall not accepting.
now the case is how can I test and check/trigger the timeout connection for keeping connect listing directory and abort the session to prevent the stuck in session.ListDirectory("/") command forever.
how to set the timeoutexception command in c#?
I found no example.