I created 2 tasks schedule (Windows Server 2022 Standard). First task running every day at 10:00 a.m. and 10:15 a.m. I have a problem second task at 10:15 a.m. I got email about msg error is
"Timeout waiting for WinSCP to respond". How can I solve my problem?
My coding:
//Setup session options
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Webdav,
HostName = "pppp.pppp.com",
RootPath = "/Upload",
UserName = "pxxxxxxxxx",
Password = "@ppppppp2024",
WebdavSecure = true,
TlsHostCertificateFingerprint = "xxxxxxxxxxxxxxxxxx",
Timeout = new TimeSpan(0, 2, 0)
};
using (Session session = new Session())
{
// Connect
//session.ReconnectTime = new TimeSpan(0, 0, 30);
session.Open(sessionOptions);
Console.WriteLine("session Open");
.
.
.
////Close
session.Close();
Console.WriteLine("session Close");
}