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


Re: Dll cannot initialize external console.

Please attach a full debug log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.DebugLogPath. Submit the log with your post as an attachment. If you do not want to post the log publicly, you can mark the attachment as private.

Can you elaborate on an environment you are getting the error with?

Dll cannot initialize external console.

I have a block of code that uploads a txt file to remote SFTP.
However, I am getting the below error.

WinSCP.SessionRemoteException: Cannot initialize external console. at WinSCP.SessionLogReader.Read(LogReadFlags flags) at WinSCP.ElementLogReader.Read(LogReadFlags flags) at WinSCP.SessionElementLogReader.Read(LogReadFlags flags) at WinSCP.CustomLogReader.TryWaitForNonEmptyElement(String localName, LogReadFlags flags) at WinSCP.CustomLogReader.WaitForGroupAndCreateLogReader() at WinSCP.Session.Open(SessionOptions sessionOptions) at XMLPostoverFTP.Class1.getFTP()

This is the block of code-

SessionOptions sessionOptions = new SessionOptions
Protocol = Protocol.Sftp,
HostName = "",
UserName = "Zuza",
Password = "frYG2CY9",
PortNumber = 22,
SshHostKeyFingerprint = "ssh-rsa 2048 a8:4c:12:ef:2f:29:c0:62:b7:37:5c:d4:73:0a:55:7b"
using (Session session = new Session())
session.ExecutablePath = null;
session.SessionLogPath = null;

TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
transferOptions.FilePermissions = null; //Permissions applied to remote files;
transferOptions.PreserveTimestamp = false; //Set last write time of
//destination file to that of source file - basically change the timestamp
//to match destination and source files.
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off;

TransferOperationResult transferResult;
transferResult = session.PutFiles("/ZUZAUpload.txt", "/Outbox/", false, transferOptions);

Would be great to get some help, on where am I going wrong.