I have tried both FTPClient and FTPConnection, both with the same results. I am mainly using FTPClient.
This is how I set the port range:
ftp = New FTPClient
ftp.ActivePortRange = New PortRange(10000, 10050)
ftp.RemoteHost = IPAddr
ftp.Timeout = FTPTimeout
ftp.ConnectMode = FTPConnectMode.ACTIVE
ftp.Connect()
ftp.Login(UserName, Passwd)
I have to admit, I'm a little confused. I created a log, but it did not match what I saw in my packet capture (using Ethereal). My log shows the correct ports but Ethereal did not. Maybe Ethereal just wasn't showing them correctly. Below is a sample log from one of my boxes that failed, followed back a small sample of the packet capture for that device.
06/20/2006 14:55:02 ---> USER root
06/20/2006 14:55:03 331 Password required for root.
06/20/2006 14:55:03 ---> PASS ********
06/20/2006 14:55:03 230 User root logged in.
06/20/2006 14:55:03 ---> CWD /mnt
06/20/2006 14:55:03 250 CWD command successful.
06/20/2006 14:55:03 Transfer Started
06/20/2006 14:55:03 ---> PORT 192,168,18,200,39,22
06/20/2006 14:55:03 200 PORT command sucessful.
06/20/2006 14:55:03 ---> RETR factory.ini
06/20/2006 14:55:03 150 Opening ASCII mode data connection for 'factory.ini' (66 bytes).
06/20/2006 14:55:03 Bytes Transfered=60; File=factory.ini
06/20/2006 14:55:03 226 Transfer complete.
06/20/2006 14:55:03 Transfer Complete
06/20/2006 14:55:03 Transfer Started
06/20/2006 14:55:03 ---> PORT 192,168,18,200,39,23
06/20/2006 14:55:03 200 PORT command sucessful.
06/20/2006 14:55:03 ---> RETR tooldata.ini
06/20/2006 14:55:03 150 Opening ASCII mode data connection for 'tooldata.ini' (75 bytes).
06/20/2006 14:55:03 Bytes Transfered=72; File=tooldata.ini
06/20/2006 14:55:03 226 Transfer complete.
06/20/2006 14:55:03 Transfer Complete
06/20/2006 14:55:03 Transfer Started
06/20/2006 14:55:03 ---> PORT 192,168,18,200,39,24
06/20/2006 14:55:03 200 PORT command sucessful.
06/20/2006 14:55:03 ---> RETR chan1.ini
06/20/2006 14:55:03 150 Opening ASCII mode data connection for 'chan1.ini' (125 bytes).
06/20/2006 14:55:03 Bytes Transfered=114; File=chan1.ini
06/20/2006 14:55:04 226 Transfer complete.
06/20/2006 14:55:04 Transfer Complete
06/20/2006 14:55:04 Transfer Started
06/20/2006 14:55:04 ---> PORT 192,168,18,200,39,25
06/20/2006 14:55:04 200 PORT command sucessful.
06/20/2006 14:55:04 ---> RETR chan2.ini
06/20/2006 14:55:04 150 Opening ASCII mode data connection for 'chan2.ini' (125 bytes).
06/20/2006 14:55:04 Bytes Transfered=114; File=chan2.ini
06/20/2006 14:55:04 226 Transfer complete.
06/20/2006 14:55:04 Transfer Complete
06/20/2006 14:55:04 Transfer Started
06/20/2006 14:55:04 ---> PORT 192,168,18,200,39,26
06/20/2006 14:55:04 200 PORT command sucessful.
06/20/2006 14:55:04 ---> RETR chan3.ini
06/20/2006 14:55:04 150 Opening ASCII mode data connection for 'chan3.ini' (125 bytes).
06/20/2006 14:55:04 Bytes Transfered=114; File=chan3.ini
06/20/2006 14:55:04 226 Transfer complete.
06/20/2006 14:55:04 Transfer Complete
06/20/2006 14:55:04 Transfer Started
06/20/2006 14:55:04 ---> PORT 192,168,18,200,39,27
06/20/2006 14:55:04 200 PORT command sucessful.
06/20/2006 14:55:04 ---> RETR chan4.ini
06/20/2006 14:55:04 150 Opening ASCII mode data connection for 'chan4.ini' (125 bytes).
06/20/2006 14:55:04 Bytes Transfered=114; File=chan4.ini
06/20/2006 14:55:05 226 Transfer complete.
06/20/2006 14:55:05 Transfer Complete
06/20/2006 14:55:05 Transfer Started
06/20/2006 14:55:05 ---> PORT 192,168,18,200,39,28
06/20/2006 14:55:05 200 PORT command sucessful.
06/20/2006 14:55:05 ---> RETR input1.ini
06/20/2006 14:55:05 150 Opening ASCII mode data connection for 'input1.ini' (28 bytes).
06/20/2006 14:55:05 Bytes Transfered=25; File=input1.ini
06/20/2006 14:55:05 226 Transfer complete.
06/20/2006 14:55:05 Transfer Complete
06/20/2006 14:55:05 Transfer Started
06/20/2006 14:55:05 ---> PORT 192,168,18,200,39,29
06/20/2006 14:55:05 200 PORT command sucessful.
06/20/2006 14:55:05 ---> RETR input2.ini
06/20/2006 14:55:05 150 Opening ASCII mode data connection for 'input2.ini' (28 bytes).
06/20/2006 14:55:05 Bytes Transfered=25; File=input2.ini
06/20/2006 14:55:05 226 Transfer complete.
06/20/2006 14:55:05 Transfer Complete
06/20/2006 14:55:05 Transfer Started
06/20/2006 14:55:05 ---> PORT 192,168,18,200,39,30
06/20/2006 14:55:05 200 PORT command sucessful.
06/20/2006 14:55:05 ---> RETR input3.ini
06/20/2006 14:55:05 150 Opening ASCII mode data connection for 'input3.ini' (28 bytes).
06/20/2006 14:55:05 Bytes Transfered=25; File=input3.ini
06/20/2006 14:55:06 226 Transfer complete.
06/20/2006 14:55:06 Transfer Complete
06/20/2006 14:55:06 Transfer Started
06/20/2006 14:55:06 ---> PORT 192,168,18,200,39,31
06/20/2006 14:55:06 200 PORT command sucessful.
06/20/2006 14:55:06 ---> RETR input4.ini
06/20/2006 14:55:06 150 Opening ASCII mode data connection for 'input4.ini' (28 bytes).
06/20/2006 14:55:06 Bytes Transfered=25; File=input4.ini
06/20/2006 14:55:06 226 Transfer complete.
06/20/2006 14:55:06 Transfer Complete
06/20/2006 14:55:06 Transfer Started
06/20/2006 14:55:06 ---> PORT 192,168,18,200,39,32
06/20/2006 14:55:06 200 PORT command sucessful.
06/20/2006 14:55:06 ---> RETR relay1.ini
06/20/2006 14:55:06 150 Opening ASCII mode data connection for 'relay1.ini' (21 bytes).
06/20/2006 14:55:06 Bytes Transfered=19; File=relay1.ini
06/20/2006 14:55:06 226 Transfer complete.
06/20/2006 14:55:06 Transfer Complete
06/20/2006 14:55:06 Transfer Started
06/20/2006 14:55:06 ---> PORT 192,168,18,200,39,33
06/20/2006 14:55:06 200 PORT command sucessful.
06/20/2006 14:55:06 ---> RETR relay2.ini
06/20/2006 14:55:06 150 Opening ASCII mode data connection for 'relay2.ini' (21 bytes).
06/20/2006 14:55:06 Bytes Transfered=19; File=relay2.ini
06/20/2006 14:55:06 226 Transfer complete.
06/20/2006 14:55:06 Transfer Complete
06/20/2006 14:55:06 Transfer Started
06/20/2006 14:55:06 ---> PORT 192,168,18,200,39,34
06/20/2006 14:55:06 200 PORT command sucessful.
06/20/2006 14:55:06 ---> RETR relay3.ini
06/20/2006 14:55:06 150 Opening ASCII mode data connection for 'relay3.ini' (21 bytes).
06/20/2006 14:55:06 Bytes Transfered=19; File=relay3.ini
06/20/2006 14:55:07 226 Transfer complete.
06/20/2006 14:55:07 Transfer Completd
06/20/2006 14:55:07 Transfer Started
06/20/2006 14:55:07 ---> PORT 192,168,18,200,39,35
06/20/2006 14:55:07 200 PORT command sucessful.
06/20/2006 14:55:07 ---> RETR relay4.ini
06/20/2006 14:55:07 150 Opening ASCII mode data connection for 'relay4.ini' (21 bytes).
06/20/2006 14:55:07 Bytes Transfered=19; File=relay4.ini
06/20/2006 14:55:07 226 Transfer complete.
06/20/2006 14:55:07 Transfer Complete
06/20/2006 14:55:07 Transfer Started
06/20/2006 14:55:07 ---> PORT 192,168,18,200,39,36
06/20/2006 14:55:07 200 PORT command sucessful.
06/20/2006 14:55:07 ---> RETR groups.ini
06/20/2006 14:55:07 150 Opening ASCII mode data connection for 'groups.ini' (15 bytes).
06/20/2006 14:55:07 Bytes Transfered=14; File=groups.ini
06/20/2006 14:55:07 226 Transfer complete.
06/20/2006 14:55:07 Transfer Complete
06/20/2006 14:55:07 Transfer Started
06/20/2006 14:55:07 ---> PORT 192,168,18,200,39,37
06/20/2006 14:55:07 200 PORT command sucessful.
06/20/2006 14:55:07 ---> RETR cache.ini
06/20/2006 14:55:07 150 Opening ASCII mode data connection for 'cache.ini' (2038 bytes).
06/20/2006 14:55:07 Bytes Transfered=1944; File=cache.ini
06/20/2006 14:55:08 226 Transfer complete.
06/20/2006 14:55:08 Transfer Complete
06/20/2006 14:55:08 Transfer Started
06/20/2006 14:55:08 ---> PORT 192,168,18,200,39,39
06/20/2006 14:55:08 200 PORT command sucessful.
06/20/2006 14:55:08 ---> RETR network.ini
06/20/2006 14:55:08 150 Opening ASCII mode data co