Unable to connect over FTP / RebexFTP

0 votes
asked Apr 11, 2014 by sujayghosh (360 points)
edited Apr 17, 2014

Hi ,

I can connect to a ftp server using Filezilla; please see below .

Status: Connection established, waiting for welcome message...
Response:   220 CMX TCP/IP - REMOTE FTP server (version 1.0) ready.
Command:    USER admin
Response:   331 Password required for admin.
Command:    PASS *****
Response:   230 User logged in, proceed.
Command:    SYST
Response:   215 "UNIX"
Command:    FEAT
Response:   502 Command not implemented.
Status: Server does not support non-ASCII characters.
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/admin" is current directory.
Command:    TYPE I
Response:   200 Type set to I.
Command:    PASV
Response:   227 Entering Passive Mode (106,69,171,113,192,5)
Command:    LIST
Response:   150 Opening BINARY mode data connection for '/admin'.
Response:   226 Transfer complete.
Status: Directory listing successful

But when I try the same with Rebex.FTP , I am seeing the FtpException message

I would like to mention that the ftp site I am trying to connect to starts with home ; home.example.com .

Login incorrect ( 530 )

Please find the code I have written below :-

        Ftp ftpClient = new Ftp();

        try
        {
            **// "home.example.com" is the FTP site I want to connect to
            // I am able to connect "home.example.com" using FileZila**

            ftpClient.Connect("home.example.com", 21); 
            ftpClient.Login("userid", "password");

            // Do Something

            if (ftpClient.IsConnected)
                ftpClient.Disconnect();

        }
        catch (FtpException  ex)
        {

            MessageBox.Show(ex.Message);

            **// The above messagebox shows  Login incorrect ( 530 )**

            if(ftpClient.IsConnected)
             ftpClient.Disconnect();

        }

Please let me know where I am going wrong.

Sujay

Applies to: Rebex FTP/SSL
commented Apr 11, 2014 by Lukas Pokorny (85,170 points)
edited Apr 11, 2014

The most common reason for this error is wrong username or password (or a different server name or port), so making sure there are the same in your code and in Filezilla is recommended.

Once you are sure all the credentials are correct, please create a communication log using ftpClient.LogWriter (see http://www.rebex.net/kb/logging.aspx for details) and post the log here as well. This will make it possible to compare the Filezilla log with Rebex log and identify any differences.

commented Apr 12, 2014 by sujayghosh (360 points)
edited Apr 12, 2014

This one is working, thanks Lucas for telling me about the log writer. How ever the same code worked.

commented Apr 14, 2014 by Lukas Pokorny (85,170 points)
edited Apr 14, 2014

Have you actually changed anything (in addition to adding LogWriter), or did it just start working on its own?

commented Apr 17, 2014 by sujayghosh (360 points)
edited Apr 17, 2014

Lukas I did not change anything. Presently I have removed LogWriter and its working. But a situation where it does not work -

1) Log into the FTP site with Filezilla 2) Try logging into the same FTP site, using the Rebex tool, and I see the error.

I have not tried logging into the same FTP site , using two different clients, so I dont know if this is a bug.

But from a user point I think, several users should be able to log into the same ftp site. In that case, I think I found a bug . :-)

Sujay

commented Apr 17, 2014 by Lukas Pokorny (85,170 points)
edited Apr 17, 2014

Well, if logging in only fails under that specific condition, it's almost certainly not a bug in the Rebex FTP client. The client simply attempts to authenticate and it's up to the server whether it allows or denies the logon attempt...

It might actually be a bug, but then it would be a bug in the server, not the client. However, I guess the server might actually be configured that way, either for some reason or due to a mistake. Do you have access to the server's log? That might shed some more light onto this problem!

1 Answer

0 votes
answered Apr 17, 2014 by Lukas Pokorny (85,170 points)

This looks like an issue with the server - see the comments above for additional information.

...