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

heitorMourao

same error

I'm getting the same error.

WinSCP.SessionRemoteException: Network Error: connection to "server" timed out.
martin

I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
reachkars

It din get created
martin

Re: "Timeout waiting for WinSCP to respond" in Session.open

Please attach also E:\Taxies\sFTPSessionLog.txt
reachkars

"Timeout waiting for WinSCP to respond" in Session.open

The Session.open(SessionOptions) is throwing a Timeout waiting for WinSCP to respond." error when executed in our production server.

The same code works perfectly fine in our Development and local servers.

However, we are able to manually execute the WinSCP.exe GUI and connect to the FTP server in our prod server

Kindly advise if there is anypermission related settings we need to consider.

Following is the DebugLog

[2012-08-30 17:32:37Z] [0003] Executing Assembly: WinSCP, Version=1.0.0.528, Culture=neutral, PublicKeyToken=b5f19f5762436b89; Path: E:\inetpub\wwwroot\FinancialReporting.IF.wsTaxIESCrystal\bin\WinSCP.DLL; Location: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\wstaxiescrystal\5c47b0c9\7096f1a3\assembly\dl3\e2b55733\00378d1d_ca48cd01\WinSCP.DLL; Product: 5.0.7.0
[2012-08-30 17:32:37Z] [0003] Entry Assembly:
[2012-08-30 17:32:37Z] [0003] Operating system: Microsoft Windows NT 5.2.3790 Service Pack 2
[2012-08-30 17:32:37Z] [0003] User: TaxiESSVC_QA@AMRS@MPHEW2NCSV011; Interactive: False
[2012-08-30 17:32:37Z] [0003] Runtime: 2.0.50727.3625
[2012-08-30 17:32:37Z] [0003] Console encoding: Input: Western European (Windows) (1252); Output: Western European (Windows) (1252)
[2012-08-30 17:32:37Z] [0003] CallstackAndLock..ctor entering
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess..ctor entering
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.GetExecutablePath entering
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.GetExecutablePath leaving
[2012-08-30 17:32:37Z] [0003] EXE executable path resolved to E:\inetpub\wwwroot\***\bin\WinSCP.exe
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.CheckVersion entering
[2012-08-30 17:32:37Z] [0003] Version of E:\inetpub\wwwroot\***\bin\WinSCP.exe is 5.0.7.2268, product WinSCP version is 5.0.7.0
[2012-08-30 17:32:37Z] [0003] Version check disabled (not recommended)
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.CheckVersion leaving
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess..ctor leaving
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.Start entering
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.InitializeConsole entering
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.InitializeConsole leaving
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.InitializeChild entering
[2012-08-30 17:32:37Z] [0003] Starting "E:\inetpub\wwwroot\***\bin\WinSCP.exe" /xmllog="C:\WINDOWS\TEMP\tmp1453.tmp" /xmlgroups /nointeractiveinput /dotnet=507 /ini=nul /log="E:\Taxies\sFTPSessionLog.txt" /console /consoleinstance=_6296_695
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.InitializeChild leaving
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.Start leaving
[2012-08-30 17:32:37Z] [0003] Command: [option batch on]
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.ExecuteCommand entering
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.ExecuteCommand leaving
[2012-08-30 17:32:37Z] [0003] Command: [option confirm off]
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.ExecuteCommand entering
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.ExecuteCommand leaving
[2012-08-30 17:32:37Z] [0003] Session.SessionOptionsToOpenArguments entering
[2012-08-30 17:32:37Z] [0003] Session.SessionOptionsToOpenSwitches entering
[2012-08-30 17:32:37Z] [0003] Session.SessionOptionsToOpenSwitches leaving
[2012-08-30 17:32:37Z] [0003] Session.SessionOptionsToOpenArguments leaving
[2012-08-30 17:32:37Z] [0003] Command: [open -hostkey="ssh-rsa 2048 0f:e4:9b:98:e6:af:85:4c:97:c0:fa:c8:4d:14:76:76" -timeout=60 "sftp://***:***@*****.com"]
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.ExecuteCommand entering
[2012-08-30 17:32:37Z] [0003] ExeSessionProcess.ExecuteCommand leaving
[2012-08-30 17:32:37Z] [0009] ExeSessionProcess.ProcessEvents entering
[2012-08-30 17:33:37Z] [0003] Exception: System.TimeoutException: Timeout waiting for WinSCP to respond.
at WinSCP.Session.CheckForTimeout()
at WinSCP.Session.Open(SessionOptions sessionOptions)
[2012-08-30 17:33:37Z] [0003] Session.Cleanup entering
[2012-08-30 17:33:37Z] [0003] Command: [exit]
[2012-08-30 17:33:37Z] [0003] ExeSessionProcess.ExecuteCommand entering
[2012-08-30 17:33:37Z] [0003] ExeSessionProcess.ExecuteCommand leaving
[2012-08-30 17:33:37Z] [0003] ExeSessionProcess.Close entering
[2012-08-30 17:33:39Z] [0003] ExeSessionProcess.Close leaving
[2012-08-30 17:33:39Z] [0003] ExeSessionProcess.Dispose entering
[2012-08-30 17:33:39Z] [0009] ExeSessionProcess.ProcessEvents leaving
[2012-08-30 17:33:39Z] [0003] ExeSessionProcess.Dispose leaving
[2012-08-30 17:33:39Z] [0003] Session.Cleanup leaving
[2012-08-30 17:33:39Z] [0003] CallstackAndLock..ctor leaving
[2012-08-30 17:33:39Z] [0003] CallstackAndLock..ctor entering
[2012-08-30 17:33:39Z] [0003] Session.DoDispose entering
[2012-08-30 17:33:39Z] [0003] Session.Cleanup entering
[2012-08-30 17:33:39Z] [0003] Session.Cleanup leaving


Thanks,
Karthik
cpvl

did you figure out how come winscp was timing out?
martin

Re: Time-Out on session.open

First, why are you setting DisableVersionCheck? Looks suspicious.

Also, please post a callstack of the exception you are getting. I'm not getting it with your code.
paulo_oli

Whole method until this point:

SessionOptions sessionOptions = new SessionOptions {
Protocol = Protocol.Sftp,
HostName = ConfigurationSettings.AppSettings["Host"],
UserName = ConfigurationSettings.AppSettings["UserName"] ,
Password = ConfigurationSettings.AppSettings["Pass"] ,
SshHostKey = ConfigurationSettings.AppSettings["HostKey"]
};

using (Session session = new Session())
{
// Connect
session.DisableVersionCheck = true;
session.Timeout = new TimeSpan(0, 2, 0);
session.SessionLogPath = @"C:\TEMP\logWinSCP";
session.ExecutablePath = @"C:\Projetos\tools\WinSCP\WinSCP.exe";
session.IniFilePath = @"C:\Projetos\tools\WinSCP\WinSCP.ini";

session.DebugLogPath = @"C:\TEMP\logWinSCP";
session.Open(sessionOptions);
paulo_oli

Re: Time-Out on session.open

martin wrote:

paulo_oli wrote:

Hi prikryl, how is it going?
After I set Session.DegugLogPath I received the error "Object reference not set to an instance of an object" in session.open command.

Please post sample of the code.



using (Session session = new Session())
{
// Connect
session.DisableVersionCheck = true;
session.Timeout = new TimeSpan(0, 2, 0);
session.SessionLogPath = @"C:\TEMP\logWinSCP";
session.ExecutablePath = @"C:\Projetos\tools\WinSCP\WinSCP.exe";
session.IniFilePath = @"C:\Projetos\tools\WinSCP\WinSCP.ini";

session.DebugLogPath = @"C:\TEMP\logWinSCP";
session.Open(sessionOptions);
martin

Re: Time-Out on session.open

paulo_oli wrote:

Hi prikryl, how is it going?
After I set Session.DegugLogPath I received the error "Object reference not set to an instance of an object" in session.open command.

Please post sample of the code.
paulo_oli

Re: Time-Out on session.open

Hi prikryl, how is it going?
After I set Session.DegugLogPath I received the error "Object reference not set to an instance of an object" in session.open command.
martin

Re: Time-Out on session.open

Please set Session.DebugLogPath and post or email me the log.
paulo_oli

Time-Out on session.open

Hi Everybody.
I'm using the component for first time.
I copied the c# example in my class and passed the parameters. When pass by session.Open(sessionOptions), after a long time I get "Time out". Do you have any idea about this waiting time on session.open?