I have specified an account with access to a number of folders with ExecutableProcessUserName and ExecutableProcessPassword and still getting the error. I imagine this is a privilege issue but the error doesn't say where I need to focus. I've tried with the session logpath set to various locations and also blank with no success. Tried with and without Debug and XML log paths too. The working version in the Windows Service is 5.7.6. I upgraded to 5.11 in the dev website code but no luck. Running dev on Windows 7 and prod on Windows Server 2008 and 2012.
Dim so As New WinSCP.SessionOptions
.Protocol = Protocol.Sftp
.HostName = ip
.UserName = id
.Password = pwd
.TimeoutInMilliseconds = AppSettings("SFTP_TIMEOUT")
.SshHostKeyFingerprint = sftp_key
Dim s As New WinSCP.Session
s.ExecutablePath = AppSettings("WINSCP_V5.7.6_EXE")
s.SessionLogPath = ""
s.DebugLogPath = AppSettings("WINSCP_V5.7.6_DEBUGLOG")
s.XmlLogPath = AppSettings("WINSCP_V5.7.6_XMLLOG")
s.ExecutablePath = AppDomain.CurrentDomain.BaseDirectory & "WinSCP.exe"
s.ExecutableProcessUserName = AppSettings("userparm")
Dim ss As New System.Security.SecureString
For x As Integer = 0 To AppSettings("pwdparm").Length - 1
s.ExecutableProcessPassword = ss