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

Author Message
MichalMichal

Guest


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 (12.22 KB)

Description: (none)

winscp2.png

winscp1.png (8.29 KB)

Description: (none)

winscp1.png

debug.log (86.9 KB) [Download]

Description: level 2

MichalMichal

Guest


attaching session log
session.log (5.22 KB) [Download]

Description: level 2

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27058
Location: Prague, Czechia
Please attach also session log file from GUI.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License