Dll cannot initialize external console.

Advertisement

Tarinishah
Joined:
Posts:
1
Location:
Seattle, WA

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 = "sftpimfs.ironmountain.com",
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;
session.Open(sessionOptions);

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);
transferResult.Check();
}

Would be great to get some help, on where am I going wrong.
Thanks[/i]

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,506
Location:
Prague, Czechia

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?

Reply with quote

Advertisement

You can post new topics in this forum