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.
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.