System.TimeoutException

Advertisement

Sanjeewa
Joined:
Posts:
3
Location:
Kandy

System.TimeoutException

I'm using winscp 5.17
and using with C#.net like below
SessionOptions sessionOptions = new SessionOptions
{
    Protocol = Protocol.Sftp,
    HostName = Settings.ftphost,
    UserName = Settings.ftp_username,
    Password = Settings.ftp_password,
    SshHostKeyFingerprint = Settings.SshHostKeyFingerprint,
    PortNumber = int.Parse(Settings.ftp_port)
};
 
using (Session session = new Session())
{
    session.Open(sessionOptions);
 
    if(session.FileExists(remotePath))
    {
        session.RemoveFiles(remotePath);
    }
        
    if (session.Opened == true)
        session.Close();
}

When I'm using with large number of files it gives me an error like this. This not happens for every time.

System.TimeoutException: Timeout waiting for WinSCP to respond - WinSCP has not responded in time. There was no output. Response log file C:\abc.tmp was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.
at WinSCP.Session.CheckForTimeout(String additional)
at WinSCP.Session.Open(SessionOptions sessionOptions)

Still couldn't find any solution for this as this happening for large number of files

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,710
Location:
Prague, Czechia

Re: System.TimeoutException

That error is happening when opening a connection. It can hardly be related to "large number of files". Unless you are opening many parallel connections. Are you?

Reply with quote

Sanjeewa

System.TimeoutException

Thanks for the reply. I'm using only one connection. there's no any parallel connections. This is created as a exe file and it's running on task scheduler. there're number of similar instances of this exe running in the scheduler like this using winscp

Reply with quote

Advertisement

You can post new topics in this forum