Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4k views
in .NET FTP by (420 points)
I had posted awhile back during development of an FTP Client using edtFTP .NET, the free version. We've now distributed the client to a few workers, and are having difficulties for some of them with logins. This is not a common issue, but it is an issue.

What I've determined is actually happening is that when using the EdtFTP.Connect method, it's including Login information and it's doing so before the server is prepared to receive USER and PASS commands. This is generating a 500 Invalid Syntax error on the server, which edtFTP interprets as Error 5, Authentication Failed.

I'd like to separate the login bit from the .Connect method altogether, so that .Connect can be fired as one method and .Login can be fired from another, after a thread sleep of about 500 milliseconds. Is this possible?

Thanks.

4 Answers

0 votes
by (162k points)
Sure, if you are using FTPConnection, set AutoLogin = false

Then use SendUserName followed by SendPassword.
0 votes
by (420 points)
Thanks, very much.
0 votes
by (420 points)
Having done this, it appears that the edtFTPClient.LoggedIn event no longer fires. Should I be using the .Login method instead of sendusername and sendpassword?
0 votes
by (162k points)
Yes, the LoggedIn event will fire with Login(). So best to use that rather than the explicit SendUserName() etc.

Categories

...