Free Support Forum - aspose.com

Password error:502 PASS command not implemented

Hi,

We are using Aspose.Network.Ftp class to try to connect to ftp hosted by Lexmark X466de printer.

We are using FtpClient.Login() function and we get:

Password error:502 PASS command not implemented.

There is no way to set password for ftp hosted by the printer.

null password & empty string password doesn't work with this ftp.

We were able to connect to this ftp using Microsoft Ftp command line.

It doesn't ask for password. Only username is prompted.

Is there a way to bypass calling of PASS command in FtpClient.Login() function and still login?

Thanks!

Hi,

Could you please post the commands that you give on Microsoft command console for our reference. Does it log in without giving the password?

Could you please try with any other windows based ftp client for example FileZilla and check the logs which commands it is sending.

Hello Saqib,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have uploaded a ZIP file that contains three logs along with a text file that lists the three different configurations that we were able to use to login using filezilla.

1. No user name and no password provided.

2. User name but no password.

3. User name and password.

Please let us know that this information is sufficient.

Thank you.

Hello Saqib,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Have these logs helped you out? We have a short deadline for this project so any feedback you can provide is appreciated.

Thank you.

Hi,

I performed the following tests at my end on a locally installed FTP server.

Scenario 1:
A user created with following credentials:
Username: test1
Password Required: No
Code to connect:
FtpClient client = new FtpClient(“127.0.0.1”, 21, “test1”, “blank or any password will work”);
client.Connect(true);
Console.WriteLine("Current dir: " + client.GetCurrentDirectory());

In the constructor, I tried with blank password or any string, it works and connects and the current directory is displayed.

Scenario 2:

A user created with following credentials:

Username: test2

Password Required: Yes
Password: test2

Code to connect:

FtpClient client = new FtpClient(“127.0.0.1”, 21, “test2”, “”); // does not work
OR

FtpClient client = new FtpClient(“127.0.0.1”, 21, “test2”, “any wrong password”); // does
not work
OR

FtpClient client = new FtpClient(“127.0.0.1”, 21, “test2”, “test2”); // connects

client.Connect(true);

Console.WriteLine("Current dir: " + client.GetCurrentDirectory());



According to my observation, if password is not required, then it should successfully connect to the ftp server, whether you specify a password or not.

I could not with the printer, but it should connect to any software or device which conforms to ftp protocol.

If the MS console ftp command line and Filezilla client can connect, then Aspose.Network should also have no problem. Could you please make sure you are initializing as above and calling Connect(true)?

Hi,

* We are using following code:

string host = "127.0.0.1"; // or Printer IP 192.168.168.87
int port = 21;
string username = ""; // or it can be any string
string password = "";

FtpClient client = new FtpClient(host, port, username, password);

client.Connect();
Trace.WriteLine(client.BannerMessage);

client.Login();
Trace.WriteLine(client.WelcomeMessage);


* Connection to MS FTP we get:

220-Microsoft FTP Service
220 Banner...
230-Welcome...
230 Anonymous user logged in.


* Connection to Printer FTP we get:

220 ET0021B78037FF Lexmark X466de FTP Server NR.APS.N368 ready.
Password error:502 PASS command not implemented.


* Using ftp.exe (from Microsoft) we get:

220 ET0021B78037FF Lexmark X466de FTP Server NR.APS.N368 ready.
User (192.168.168.87:(none)):
230 User default logged in.
ftp>


I was able to connect to Printer FTP with Ftp-related Classes in .Net Framework also.
It looks like Aspose.Network.Ftp class requires PASS command implemented in FTP Server.
Can it be changed so that we login with username of empty string ("") and NO password provided?

Thanks.

Hi,

Thanks for providing the necessary details. We are looking into it and will get back to you soon with our feedback.