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: Issue : Timeout waiting for WinSCP to respond

You system might have been overloaded at the time.
Try setting Session.Timeout to more than the default 1 minute.
Also you should not set the DisableVersionCheck.
Sasidharan9513

Issue : Timeout waiting for WinSCP to respond

Hi There,

I created a job ( using the winscp .net assembly), which inturn connect to the linux server and move from files from linux server to the windows server. service is running in the windows server.
All day long it is working fine and suddenly I got the below error at about 2:19 pm and I don't encounter this issue after that.

Error Information:
------------------
1/4/2013 2:19:03 PM::Timeout waiting for WinSCP to respond - Log file C:\WINDOWS\TEMP\tmp1081.tmp was not created in time, please make sure WinSCP has write permissions to the folder
at WinSCP.Session.CheckForTimeout(String additional)
at WinSCP.Session.Open(SessionOptions sessionOptions)

Below is the .NET code:

// Setup winscp session options
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = ConfigurationManager.AppSettings["HOST_NAME"],
UserName = ConfigurationManager.AppSettings["USER_NAME"],
Password = ConfigurationManager.AppSettings["SFTP_PSWD"],
SshHostKey = ConfigurationManager.AppSettings["SFTP_SSHKEY"]
};

using (Session session = new Session())
{

TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Automatic;
TransferOperationResult transferResult;

// open winscp connection
session.ExecutablePath = winscpExePath;
session.DisableVersionCheck = true;
session.Open(sessionOptions);
}

Please let me know what causing this problem and what I suppose to do to avoid it.

I wounder why WINSCP is trying to create a log file in temp directory when there is no .NET code to create a log file.

I don't want any issue in production environment.

Regards,
S.Sasidharan