I am writing a C# script that when run on a client, will transfer some files from the server to the client's device. I am using Windows 10 Pro as an FTP server, and WinSCP version 5.19.6 (the latest version at the time of writing) as the client.
To set up Passive mode on the FTP server, I have set the Firewall external IP address and the data channel port range as 63000-65000. I have also opened the port range on the inbound Firewall, and enabled all FTP rules on the server.
When I run the script on Passive mode, the client is able to connect to the server, but I receive a timeout exception when it is retrieving the server's directory listing. Looking at the log files, the data channel seems to close at PASV.
I have no problems connecting and retrieving the files through Active mode (as long as Firewall exceptions are allowed on the client). However, I hope to entirely eliminate the need for user interaction with the file transfer process, therefore it would be great to avoid the Firewall message popup entirely when running the script, which is why I am trying to use Passive mode.
I have attached the relevant log files below. I would appreciate to have some help on this issue.