Re: .NET assembly log file says User name: (Password: No, Key file: No, Passphrase: No)
I'm sorry, but I cannot imagine how these logs could have been produced by your code, unless the
With this trivial code, basically identical to yours, just with explicit values:
I get log like this:
sUserName
is null
.
With this trivial code, basically identical to yours, just with explicit values:
// Setup session options
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
FtpSecure = FtpSecure.Implicit,
HostName = "hostname",
UserName = "username",
Password = "password",
};
using (Session session = new Session())
{
session.SessionLogPath = "c:\\AKH\\WinSCP.log";
// Connect
session.Open(sessionOptions);
}
I get log like this:
> 2024-02-26 12:13:51.691 Script: open ftp://username:***@hostname -implicit -passive=1 -timeout=15
. 2024-02-26 12:13:51.691 --------------------------------------------------------------------------
. 2024-02-26 12:13:51.691 Session name: username@hostname (Ad-Hoc site)
. 2024-02-26 12:13:51.691 Host name: hostname (Port: 990)
. 2024-02-26 12:13:51.691 User name: username (Password: Yes, Key file: No, Passphrase: No)