Getting Access Denied despite having granted myself full permissions

0 votes

Hi

It seems for some odd reason that If I progress one step at a time I can get to where I need to go. Having done that I now get an access Denied error when I try and upload.

I have checked the permissions on the directory for the FTP user account I created and it does have full control. Have I got something wrong in my syntax for the upload command?

void Main()
{
    const string ftpUsername = "myusername";
    const string ftpPassword = "mypassword";
    string localFilePath = $@"C:\Users\Public\...\2019MarchUnderTen.xml";

    using (Ftp client = new Ftp())
    {
        client.ServerCertificateValidate += ValidateCertificate;

        client.ConnectSSL("mywebsite.co.uk", 990);
        client.Login(ftpUsername, ftpPassword);
        string currentFolder = client.GetCurrentFolder();
        Console.WriteLine(currentFolder);

        client.ChangeFolder("mywebsite.co.uk");
        client.ChangeFolder("wwwroot");
        client.ChangeFolder("QuotaCatchLimits");

        string newcurrentFolder = client.GetCurrentFolder();
        Console.WriteLine(newcurrentFolder);


        client.Upload($@"{newcurrentFolder}", $"{localFilePath}");
        client.Close();
    }
}
related to an answer for: How do I change folders with FTP.dll
asked Mar 16 by Dominic

1 Answer

0 votes

Can you try using:

client.Upload("2019MarchUnderTen.xml", $"{localFilePath}");
answered Mar 16 by Limilabs support (230,760 points)
Perfect, Many thanks.

Now to try the mail dll with a view to integrating the two.
...