Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

mouton

Thanks for responding. I figured this out. As it was to be expected, one of the params (port) was not being passed properly. :-(
martin

Re: Timeout issue in .Net but not in UI

Please post a complete session log files both from GUI and .NET.
mouton

Timeout issue in .Net but not in UI

Hi,

I have a .Net application which automates file download. When I try to connect to a site making an SFTP connection via the .Net app, I get a time out error. When I try to connect to the exact same site via the user interface, I connect fine. I copied the code generated by the Generate Session/URL,and added a few more options but still, the error persists.

Here is the actual code, where _connInfo is the information I am passing in:

sessionOptions.Protocol = Protocol.Sftp;
sessionOptions.SshPrivateKeyPath = _connInfo.SshPrivateKeyPath;
sessionOptions.GiveUpSecurityAndAcceptAnySshHostKey = false;
sessionOptions.SshHostKeyFingerprint = _connInfo.SshHostKeyFingerprint;
sessionOptions.HostName = _connInfo.ServerHostName;
sessionOptions.UserName = _connInfo.ServerUserName;
sessionOptions.Password = _connInfo.ServerPassWord;
sessionOptions.PortNumber = _connInfo.ServerPort;
sessionOptions.AddRawSettings("ProxyPort", "0");

Here is the exact error: "ex.Message = "Network error: Connection to \"xxx.xxx.xxx.xxx\" timed out."

Extending the timeout did not work either.

I am using WinSCP version 5.13.1.0.
Any help would be much appreciated.