this is a network error and usually means that the target machine/port is not accessible. Possible causes:
- The target machine is offline or not connected to the network at the moment.
- No FTP server runs at the target machine at specified port.
- Access to the specified port was blocked by firewall policy at the target machine.
- Access to the specified port was blocked by firewall policy at your local machine.
Are you able to connect to the target machine using any third-party FTP client (such as Filezilla) from the same computer where you tried running your code?
This kind of error is usually thrown from ftp.Connect call and not from ftp.PutFile.
Could your either edit your question and include the FTP communication log or mail it to firstname.lastname@example.org for analysis? You can see how to create a communication log at http://www.rebex.net/kb/logging.aspx. This log will include the exception details and might help us to determine the root cause of the problem.