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

martin

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

Please attach also session log file from GUI.
MichalMichal

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

attaching session log
MichalMichal

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 mywebsite.com 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 "mywebsite.com" 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 = "mywebsite.com",
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";
Console.WriteLine("Connecting...");
session.Open(sessionOptions);

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

Best regards,
Michal