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.
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;
// open winscp connection
session.ExecutablePath = winscpExePath;
session.DisableVersionCheck = true;
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.