Good time of day.

I was tormented all day today, this is my first time, in short, in general, I made a class for viewing the FTP directory in a convenient format. I send a request for a passive mode to the server, in response it should return the IP and port for wiretapping, but instead in the message it returns the previous answer, for example, if before the PASV command it was PASS, it will return what the user says PASS command, not PASV. And when I do debugging, I request the passive mode twice, then everything works, but when I let it go through ctrl + f5, then in a couple of seconds an exception flies that the server did not answer and all that. (C # language, to connect using TcpClient.)

I don’t know how clearly I could explain the problem, if I can add anything, I’m already very tired already, and I still want to understand what the matter is, who will help - thank you very much.

    1 answer 1

    Raise your server - you can track the differences between sessions.

    Or put the same filezilla - it shows the command session with the server beautifully.

    PASS commands, by the way, no - this is the operand for entering a password and only after USER. There is PASV - switching to passive mode.

    Protocol:

    <220 привет от сервера >USER login <331 Введите пароль >PASS 123123123 <Если тут 2ХХ - то можно дальше. Если 5ХХ - то идите нафиг, пароль не тот. 

    And only here you can do the switching in PASV mode.

    By the way, before that they recommend to execute FEAT - and get a list of commands.

    • thanks we will try) - arlek