Dear Team,
I am using WinSCP 5.9.0.0 version for file transfer from Server to Local machine .
When I run it through code its running, but when hosted in IIS 7.5 its not working.
Application is a web page in C# .net 4.0.
I am getting
"Cannot initialize external console. Request event System Error. Code: 5. Access is denied" error .
Session not open and getting SessionRemoteException type exception
code used
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = strHostName,
UserName = strUserName,
Password = strPassword,
PortNumber = Convert.ToInt16(strPortNumber),
GiveUpSecurityAndAcceptAnySshHostKey = true
};
using (Session session = new Session())
{
session.Open(sessionOptions);
SynchronizationResult synchronizationResult;
synchronizationResult =
session.SynchronizeDirectories(
SynchronizationMode.Local, strDownloadFilePath + remotepathdate + "\\", remotePath, false);
synchronizationResult.Check();
}
//strDownloadFilePath : local path where file to be download
Please revert.
Thank you.