Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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)


Topic review


Getting "timeout waiting for external console to complete"


We are using WinSCP .NET DLL and the WinSCP.exe for SFTP transfers in our .NET project. We get the "timeout waiting for external console to complete" error box despite using the WinSCP .NET wrapper DLL. On your support documentation it is mentioned that the best way to avoid getting that error is to use the wrapper.

The WinSCP.exe version info is as follows:
File Version:
Product Version:

Please help us resolve the issue - we have even tried increasing the time out to 24 hours as the code below shows. The following is the code snippet that does the file transfer:

string[] sftpConfig = configHelper.SFTPConfiguration; //Our internal config object

string sftpUrl = sftpConfig[0];
string sftpPort = sftpConfig[1];
string sftpUser = sftpConfig[2];
string sftpPass = sftpConfig[3];
TimeSpan timeoutFTP = new TimeSpan(24, 0, 0, 00, 0);

SessionOptions sessionOptions = new SessionOptions
    Protocol = Protocol.Sftp,
    HostName = sftpUrl,
    UserName = sftpUser,
    Password = sftpPass,
    Timeout = timeoutFTP,
    SshHostKeyFingerprint = "ssh-rsa 2048 7e:8b:ae:0b:89:b2:a1:f7:43:ce:ab:fe:4e:8f:f4:13"

int portNumber;

if(int.TryParse(sftpPort, out portNumber))
    sessionOptions.PortNumber = portNumber;

using (Session session = new Session())
    // Connect
    session.DisableVersionCheck = true;

    // Upload files
    TransferOptions transferOptions = new TransferOptions();

    transferOptions.TransferMode = TransferMode.Binary;
    transferOptions.ResumeSupport.State = TransferResumeSupportState.On;

    TransferOperationResult transferResult;

    string path = string.Format("{0}\\*.bin", configHelper.SaveLocation);

    transferResult = session.PutFiles(path, ConfigurationManager.AppSettings["FTPFolderLocation"], false, transferOptions);


    foreach (TransferEventArgs transfer in transferResult.Transfers)
        //Here we check the Transfer.FileName to move successfully transferred
        //files to archive location