Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Timeout waiting for WinSCP to respond when using task schedule.

Please set both Session.SessionLogPath and Session.DebugLogPath and post both logs from both tasks.
Nicki16

Timeout waiting for WinSCP to respond when using task schedule.

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");
}