Issue : Timeout waiting for WinSCP to respond

Advertisement

Sasidharan9513
Joined:
Posts:
11

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,809
Location:
Prague, Czechia

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.

Reply with quote

Advertisement

You can post new topics in this forum