0

I have C# app with FluentFTP in it. I sent it to couple of my friends and for all of them it works fine, but for one guy it throws the timeout exception. Any idea how could I fix it?

I'm using .net Framework 4.7.2. The code just logins to my web and uploads some files using ftp.

FtpClient client = new FtpClient("ftpupload.net", "name", "pass");
client.AutoConnect();

The error is:

System.TimeoutException: Timed out trying to connect!
    at FluentFTP.FtpSocketStream.Connect(String host, Int32 port, FtpIpVersion ipVersions)
    at FluentFTP.FtpClient.Connect(FtpSocketStream stream)
    at FluentFTP.FtpClient.Connect()
    at FluentFTP.FtpClient.AutoDetect(Boolean firstOnly, Boolean cloneConnection)
    at FluentFTP.FtpClient.AutoConnect()
    at Písmenka.Registrace.btnRegistrace_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.B  

I have already tried to run as admin, turn off Windows Defender and firewall and install .NET Framework for him.

burnsi
  • 6,194
  • 13
  • 17
  • 27
X3oWyR
  • 1
  • 1
  • 2
  • try to set mode from `FtpEncryptionMode.Explicit` to `FtpEncryptionMode.Implicit`=> `client.EncryptionMode = FtpEncryptionModeImplicit;` Additionally you can log everything. See FAQ for implementing logging: https://github.com/robinrodricks/FluentFTP/wiki/Logging – Sebastian Siemens Feb 02 '23 at 07:24

0 Answers0