Using WinSCP in Web Site getting error - Timeout waiting for WinSCP to respond - WinSCP has not resp
Hi,
I am calling WinSCP in our aspx web page for doing FTPS from web Site. when we do the FTPS getting below error :
Timeout waiting for WinSCP to respond - WinSCP has not responded in time. There was no output. Response log file C:\Windows\TEMP\wscp3228.02982183.tmp was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.
I an writing below code in our web page.
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
FtpSecure = FtpSecure.Implicit,
HostName = hostName,
//PortNumber = portNumber,
UserName = userName,
Password = password,
TlsHostCertificateFingerprint = sFingerprint,
};
using (Session session = new Session())
{
session.SessionLogPath = ConfigurationManager.AppSettings["FTP_Log_File"].ToString() + DateTime.Now.ToString("yyMM") + "/" + "Log_" + DateTime.Now.ToString("ddMMyyyy") + ".txt".Replace("/", "\\");
session.Open(sessionOptions);
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
transferOptions.FilePermissions = null;
transferOptions.PreserveTimestamp = false;
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off;
TransferOperationResult transferResult;
transferResult = session.PutFiles(sourceFilePath, filename, false, transferOptions);
transferResult.Check();
}
Also I am not able to create Session log file due to this error.
Pls look into this and give me the solution how I can fix this problem.
Thanks
Nikesh
I am calling WinSCP in our aspx web page for doing FTPS from web Site. when we do the FTPS getting below error :
Timeout waiting for WinSCP to respond - WinSCP has not responded in time. There was no output. Response log file C:\Windows\TEMP\wscp3228.02982183.tmp was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.
I an writing below code in our web page.
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
FtpSecure = FtpSecure.Implicit,
HostName = hostName,
//PortNumber = portNumber,
UserName = userName,
Password = password,
TlsHostCertificateFingerprint = sFingerprint,
};
using (Session session = new Session())
{
session.SessionLogPath = ConfigurationManager.AppSettings["FTP_Log_File"].ToString() + DateTime.Now.ToString("yyMM") + "/" + "Log_" + DateTime.Now.ToString("ddMMyyyy") + ".txt".Replace("/", "\\");
session.Open(sessionOptions);
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
transferOptions.FilePermissions = null;
transferOptions.PreserveTimestamp = false;
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off;
TransferOperationResult transferResult;
transferResult = session.PutFiles(sourceFilePath, filename, false, transferOptions);
transferResult.Check();
}
Also I am not able to create Session log file due to this error.
Pls look into this and give me the solution how I can fix this problem.
Thanks
Nikesh