Element "cwd" not found in the log file

Advertisement

mkozak
Joined:
Posts:
2
Location:
United States

Element "cwd" not found in the log file

Trying to upload a file I get this error message on session.Open(sessionOptions);

I've attached the log files.


SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "virt01",
UserName = "root",
Password = "mypassword",
PortNumber = 22,
SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
};


// Connect
session.DebugLogPath = Environment.GetEnvironmentVariable("USERPROFILE") + "\\AppData\\Local\\Commander\\DebugLogPath.txt";
session.SessionLogPath = Environment.GetEnvironmentVariable("USERPROFILE") + "\\AppData\\Local\\Commander\\SessionLogPath.txt";
session.DisableVersionCheck = true;
session.Open(sessionOptions);
  • SessionLogPath.txt (6.61 KB, Private file)
  • DebugLogPath.txt (28.03 KB, Private file)

Reply with quote

Advertisement

mkozak
Joined:
Posts:
2
Location:
United States

Error: {0}WinSCP.SessionLocalException: Element "cwd" not found in the log file
at WinSCP.CustomLogReader.WaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForNonEmptyElementAndCreateLogReader(String localName, LogReadFlags flags)
at WinSCP.Session.Open(SessionOptions sessionOptions)
at F5_Add.Add.WinSCP(String source, String dest) in c:\Users\mkozak\Documents\Visual Studio 2013\Projects\F5 Add\F5 Add\Add.cs:line 1806

Reply with quote

vpuchko
Joined:
Posts:
2
Location:
adf

Element "cwd" not found in the log file

Hey,

I've got the same exception when trying to synchronize directories. I was using Syncplify.me Server! server and the following code to sync dirs:
                var sessionOptions = new SessionOptions
                {
                    Protocol = Protocol.Sftp,
                    HostName = _settingsService.GetValue((SFTPSettings s) => s.InboundHost, string.Empty),
                    UserName = _settingsService.GetValue((SFTPSettings s) => s.InboundUsername, string.Empty),
                    Password = _settingsService.GetValue((SFTPSettings s) => s.InboundPassword, string.Empty),
                    SshHostKeyFingerprint = _settingsService.GetValue((SFTPSettings s) => s.InboundSshHostKeyFingerprint, string.Empty)
                };
                SynchronizationResult result;
                using (var session = new Session {ExecutablePath = _winScpPath, DisableVersionCheck = true})
                {                 
                    session.Open(sessionOptions);

                    result = session.SynchronizeDirectories(SynchronizationMode.Local, localFolderPath,
                        folderPath, removeFiles: true);

                    result.Check();
                }

I used standard SFTP server settings and added all required permissions to the user.
Description: session log
Description: debug log

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum