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

Advertisement

charles
Joined:
Posts:
2

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.

Reply with quote

Advertisement

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

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.

Reply with quote

charles
Joined:
Posts:
2

here's the log file

Sorry, here's the log file from a purposely mangled password (adding one character).
  • log.txt (4.66 KB, Private file)
Description: purposely mangled password connecting to a filezilla server.

Reply with quote

Advertisement

You can post new topics in this forum