Access to the path 'WinSCPConsoleEventRequest_3908_5474662_340' is denied
We have to convert several apps to use SFTP over FTP. Getting:
I have specified an account with access to a number of folders with
onAccess to the path 'WinSCPConsoleEventRequest_3908_5474662_340' is denied
session.Open
. However this code is working fine in a Windows Service, but failing in a .NET website.
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 With so .Protocol = Protocol.Sftp .HostName = ip .UserName = id .Password = pwd .TimeoutInMilliseconds = AppSettings("SFTP_TIMEOUT") .SshHostKeyFingerprint = sftp_key End With 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") Using s 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 ss.AppendChar(AppSettings("pwdparm")(x)) Next s.ExecutableProcessPassword = ss s.Open(so)