I get this error when trying to transfer a file using FTPS. I think this is related to accepting certificates.

This is a portion of my code:

TlsParameters par = new TlsParameters();

            par.CertificateVerifier = CertificateVerifier.AcceptAll;

            ftp.Connect(hostname, 21, par, FtpSecurity.Unsecure);
            ftp.Login(username, password);
            ftp.TransferType = FtpTransferType.Ascii;

            ftp.ChangeDirectory(dirChange);

            long bytes;
            if (method == "get")
            {
                bytes = ftp.GetFile(remoteFile, localFile);
            }

I have tried several options and either I get the error above or the connection times out.

I also tried to get a list of files which times out also. It times out at the point the passive command is given.

ftp.Connect(hostname); ftp.Secure(); ftp.Login(username, password);

            string original = ftp.GetCurrentDirectory();
            ftp.ChangeDirectory(dirChange);

            FtpList files = ftp.GetList();
            string[] arrFiles = new string[files.Count];

            for (int i = 0; i < files.Count; i++)
            {
                arrFiles[i] = files[i].Name;
            }
            return arrFiles;

asked 13 Dec '11, 19:29

lance's gravatar image

lance
151
accept rate: 0%

edited 13 Dec '11, 22:17

Please use Ftp object's LogWriter property (as described at http://www.rebex.net/kb/logging.aspx) to create a communication log showing both of these issues and add it to your post or mail it to support@rebex.net for analysis - then we should be able to tell more.

(14 Dec '11, 15:45) Lukas Pokorny ♦♦

I am not getting this error anymore. Several things have changed including getting a new version of the FTPS component.

link

answered 14 Dec '11, 19:31

lance's gravatar image

lance
151
accept rate: 0%

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:

×14
×11
×8

Asked: 13 Dec '11, 19:29

Seen: 185 times

Last updated: 14 Dec '11, 19:31