login about faq

Greetings,

I am able to establish a connection to a secure FTP server using Filezilla with the log below


Status: Resolving address of ftp1.supplywholesale.co.nz Status: Connecting to 203.44.12.166:21... Status: Connection established, waiting for welcome message... Status: Initializing TLS... Status: Verifying certificate... Status: TLS connection established. Status: Connected Status: Retrieving directory listing... Status: Directory listing of "/" successful


but attempting to do this programatically using FTP2 and C# just does not work - always returning a 301 (login) error- but I know the username and password are correct

Code is : Chilkat.Ftp2 myftp = new Chilkat.Ftp2(); bool unlock = myftp.UnlockComponent("K...................................."); myftp.AuthTls = true; myftp.Ssl = false; myftp.Hostname = "ftp1.supplywholesale.co.nz"; myftp.ConnectOnly(); myftp.ClearControlChannel(); myftp.ConvertToTls();

        myftp.Username = "garth.holden@korzoo.co.nz";
        myftp.Password = "z.............";

        myftp.LoginAfterConnectOnly();

        bool success= myftp.Connect();

Any help would be appreciated

asked Oct 08 '15 at 13:26

ReAnalyse's gravatar image

ReAnalyse
11


Remove the calls to ClearControlChannel and ConvertToTls -- they are not needed. When the AuthTls property = true, the connection is automatically converted to TLS. Examine the LastErrorText after calling ConnectOnly to see..

link

answered Oct 08 '15 at 13:35

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Thanks your help much - connects OK after myftp.ConnectOnly() Weird the 301 error after the myftp.Username = "garth.holden@korzoo.co.nz"; myftp.Password = "z.............";

    myftp.LoginAfterConnectOnly();

as I know the username and password are correct (copied over directly from filezilla)

link

answered Oct 08 '15 at 13:40

ReAnalyse's gravatar image

ReAnalyse
11

Suddenly burst into like, many thanks for your help

link

answered Oct 08 '15 at 14:24

ReAnalyse's gravatar image

ReAnalyse
11

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×6

Asked: Oct 08 '15 at 13:26

Seen: 620 times

Last updated: Oct 08 '15 at 14:24

powered by OSQA