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

Advertisement

MichalMichal
Guest

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

winscp2.png

winscp1.png

Description: level 2

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,540
Location:
Prague, Czechia

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

Please attach also session log file from GUI.

Reply with quote

Advertisement

You can post new topics in this forum