G
G
Gatix2022-02-03 19:50:37
FTP
Gatix, 2022-02-03 19:50:37

C# FTP connections do not work (530 Error when connecting, although the password and username are correct), how to fix it?

The code is the most standard for an FTP connection, and the most interesting thing is that it's not about hosting, and it's not about the code. The code, as I said, is the most standard, and it is unlikely that it is a problem, but I tested about 3 hostings and did not help. And what is also interesting, if you restart your computer and try to connect to the same FTP server through FileZilla, everything works, but if you connect through C # (it will give an error), and then through fileZilla, it will give the same error but in FileZilla. Very strange problem

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
Gatix, 2022-02-04
@Gatix

I found a solution, for some reason when I copied the connection password from the hosting panel with FTP data, it gave an error regardless of whether it was FileZilla or C #, and if the password is written manually, everything works. It turned out to be a stupid problem, but I killed a whole day on it

D
Drno, 2022-02-03
@Drno

what kind of error is that?
just 530?
what port is ftp on?
What's in the FTP server logs?
it is quite possible that you are breaking into a non-existent directory

H
Hanneman, 2022-02-03
@Hanneman

Run a packet sniffer - such as Wireshark.
Make dumps: the first when you connect using FileZilla, and the second when you connect with your "very standard code".
Post the result here. Then we compare and then it will be possible to understand something. Or you yourself will see the difference and understand what's the matter.

B
BasiC2k, 2022-02-04
@BasiC2k

Try using the fluentftp package There are
examples of usage on the web.
Just make sure you have FTP and not SFTP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question