Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

JCornelison

I found out what was causing the issue. I had a bad timeout number set. I adjusted it to a better value and now it is working instantly.
JCornelison

The GUI is basically instant connection. I was using the Renci library and that also connects really fast. I was planning on swapping from Renci to WinSCP due to the flexibility it provides.
martin

Re: Taking about 30 seconds to establish an SFTP Connection

Is the connection faster in GUI? If it is, post session (not debug) logs both from GUI and your code.
If the GUI connection is slow too, is it faster in any other SFTP client?
JCornelison

Taking about 30 seconds to establish an SFTP Connection

Hello,

I am using the WinSCP.net library version 6.1.2. It seems to take about 30 seconds for the .Open() to create a connection. Then when I try to grab a file, it takes about 20 seconds.

When I look at the DebugLogPath file, it looks like there is a lot of looping going on. Any suggestions on what may be causing the issue?
SessionOptions sessionOptions = new SessionOptions
{
    Protocol = Protocol.Sftp,
    HostName = _host,
    UserName = _user,
    PortNumber = _port,
    SshHostKeyFingerprint = _fingerPrint,
    SshPrivateKeyPath = _localKeyPath,
    TimeoutInMilliseconds = _timeOut
};