Topic "Dll cannot initialize external console."

Author Message
[View user's profile]

Joined: 2015-02-26
Posts: 1
Location: Seattle, WA
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.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
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?
Martin Prikryl

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License