Post a reply

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)


Topic review


Re: timeout on .NET Assembly, not when using WINSCP.EXE client

Please attach also session log file from GUI.

Re: timeout on .NET Assembly, not when using WINSCP.EXE client

attaching session log

timeout on .NET Assembly, not when using WINSCP.EXE client

Hello Support,

I get a strange behavior on our server.
When I try to connect to via winscp.exe all is fine, it's listing thousands of folders and all is ok.
Although I get an error on session.Open(sessionOptions) with a timeout

WinSCP.SessionRemoteException: Network error: Connection to "" timed out.
at WinSCP.SessionLogReader.Read(LogReadFlags flags)
at WinSCP.ElementLogReader.Read(LogReadFlags flags)
at WinSCP.SessionElementLogReader.Read(LogReadFlags flags)
at WinSCP.CustomLogReader.TryWaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.Session.Open(SessionOptions sessionOptions)

private static TimeSpan span = new TimeSpan(0, 0, 2, 0, 0);
private static SessionOptions sessionOptions = new SessionOptions
Protocol = Protocol.Sftp,
HostName = "",
UserName = "DataCenter",
PortNumber = 22,
Timeout = span,
TimeoutInMilliseconds = 120000,
Password = "password",
SshHostKeyFingerprint = "ssh-rsa 2048 9c:ag:d1:30:a6:45:3g:b4:71:92:ba:02:6b:c8:c9:69"

session.Timeout = span;
session.DebugLogLevel = 2;
session.DebugLogPath = @"D:\log\debug.log";
session.SessionLogPath = @"D:\log\session.log";

I attach session and debug logs from assembly app.
Could you please help me?

Best regards,