none
530 Not logged in (Error on uploading file with webclient) RRS feed

  • Question

  • Hello!

    I have a problem that I have googled around and can't find a solution to.

    I am trying to upload a file to my server. I will describe the problem like below to cover the whole problem scenario:

    1. I use the code in Sweden and it works to upload the file without problem!

    2. I also try to upload the file with Filezilla from Sweden without any problem!

    (Firewall is turned off completely on the computer in Greece)

    3. I use the code on a computer in Greece and return the error: "530 Not logged in" 

    4. I also try login to my account using Filezilla on the computer in Greece and it is not possible!

    That is the scenario which means that I have the correct username and password where the username is only letters and the password is letters, numbers and a # without any spaces. To mention is that the upload of files did work on the computer in Greece for 2 months ago but suddenly stopped working.

    What can the problem be?

                try
                {
                    WebClient client = new WebClient();
                    NetworkCredential nc = new NetworkCredential(user_name, password);
                    Uri addy = new Uri("ftp://www.mysite.com/site/folder1/folder2/test.txt");
                    client.Credentials = nc;
                    byte[] arrReturn = client.UploadFile(addy, "C:/folder/test.txt");
                }
                catch (Exception ex1)
                {
                    MessageBox.Show(ex1.Message);
                }


    Saturday, February 24, 2018 10:26 PM

All replies

  • Have you seen/tried this solution?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Sunday, February 25, 2018 12:35 AM
    Moderator
  • Yes that was one of the solutions that I did try and that didn't work either?
    Sunday, February 25, 2018 3:27 PM
  • Hello Silvers11,

    The remote FTP server is indicating that one or more of the following information is incorrect: host address, username, password. Please double check all items.

    If those are all correct. I think the issue is more related to remote FTP server configuration issues. Maybe account limited, security problems and so on.

    Best regards,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 26, 2018 7:23 AM
    Moderator