Tried to use the FTP task from inside our development environment but could not get it to work. A network trace showed that login worked but then a PORT command was issued with IP and port of the local machine. Traffic moves through a gateway so the connection was correctly terminated by the server. This clearly shows that the mode of operation is Active/PORT.<br><br>NOTE: I'm running this from a Windows Server 2008 machine, which issues the following command: PORT 10,0,1,115,X,Y<br><br>10.0.1.115 is the local network IP, then followed by port numbers. Trying the same operation from a Windows 7 workstation do actually work. The PORT command is still issued, but now: PORT 192.168.10.102,X,Y<br><br>I'm not sure why this works and not from the server. The FTP client clearly reports a local IP in both cases.<br><br>Anyway, I found the problem. The flag in Framework.Communication.Ftp.NativeMethods that indicates passive mode has a value of 8. This is incorrect, INTERNET_FLAG_PASSIVE is 0x08000000 (ref http://msdn.microsoft.com/en-us/library/windows/desktop/aa383661(v=vs.85).aspx)<br><br>Doing a new network trace now shows that the FTP client correctly issues the PASV command instead of PORT.<br><br>I have attached a patch that fixes this.
Comments: Resolved with changeset 81839: Ftp: Fix for InternetFlagPassive value.
Resolves #11386 (Ftp task is not doing Passive mode as expected) raised by plillevold on 27 Nov 2012
Comments: Resolved with changeset 81839: Ftp: Fix for InternetFlagPassive value.
Resolves #11386 (Ftp task is not doing Passive mode as expected) raised by plillevold on 27 Nov 2012