0 votes
by (360 points)
edited

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
by (147k points)
edited

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.

by (360 points)
edited

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

by (147k points)
edited

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

by (360 points)
edited

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

by (147k points)
edited

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
by (147k points)

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

...