Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.2k views
in .NET FTP by (240 points)
I am using the following code to connect to my FTP server

FTPClient ftp;
ftp = new FTPClient();
ftp.RemoteHost=mHostName; //Host Name to connect to
ftp.ControlPort = mPort; //Port to Connect on
ftp.Timeout =mTimeOut; //TimeOut Value
ftp.ConnectMode = mConnectMode ; //PASV
ftp.Connect();
ftp.Login(mUserName, mUserPassword);


Immediately after Connect, trying to Login gives me "Unable to read data from the transport connection." But if I try to run the same code again, it lets me login perfectly (maybe cos it has already established a connection).

Should there be a time lag between Connect and Login. Would putting a sleep help?? I am not sure whats going on??

Thanks

1 Answer

0 votes
by (162k points)
post the relevant section of the log file, it might tell us something

Categories

...