Post a reply

Options
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)

Options

Topic review

martin

Re: here's the log file

Thanks. I'll look into it.
charles

here's the log file

Sorry, here's the log file from a purposely mangled password (adding one character).
martin

Re: WinSCP.SessionRemoteException: Credentials were not specified --- with invalid credentials

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

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
charles

WinSCP.SessionRemoteException: Credentials were not specified --- with invalid credentials

Hi, I'm building a .Net Core console app using the NuGet WinSCP package, version 6.3.4.
When connecting to an FTPS server with bad credentials, I get this exception:
WinSCP.SessionRemoteException: Credentials were not specified.

   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.WaitForNonEmptyElement(String localName, LogReadFlags flags)
   at WinSCP.CustomLogReader.WaitForNonEmptyElementAndCreateLogReader(String localName, LogReadFlags flags)
   at WinSCP.CustomLogReader.WaitForGroupAndCreateLogReader()
   at WinSCP.Session.WaitForGroup()
   at WinSCP.Session.Open(SessionOptions sessionOptions)

I was expecting an 'authorization failed' or 'invalid credentials' exception?
I proved the credentials are there by purposely changing the correct password by adding an invalid character to the correct password, getting the above exception, then removing the one extra character, and then connecting.
This is on Windows Server 2022, Visual Studio 2022.
Thanks.