Access to the path 'WinSCPConsoleEventRequest_3908_5474662_340' is denied

Advertisement

bozworthy
Joined:
Posts:
4
Location:
US

Access to the path 'WinSCPConsoleEventRequest_3908_5474662_340' is denied

We have to convert several apps to use SFTP over FTP. Getting:
Access to the path 'WinSCPConsoleEventRequest_3908_5474662_340' is denied
on 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)

Reply with quote

Advertisement

Guest

Debug file attached

I deployed this to the server and it is actually able to produce a debug file there. I've attached it. Now getting 'Access denied' error but it's not clear on what location.
  • DEBUG_Log_2017-09-07_04-05-31.txt (6.18 KB, Private file)
Description: Debug log from test server

Reply with quote

Guest

Re: Debug file attached

I've added the identity being impersonated to 'Act as operating system' and now the error is "The stub received bad data".

Reply with quote

bozworthy
Joined:
Posts:
4
Location:
US

Debug log

Attaching debug log after adding user to higher privilege groups
  • DEBUG_Log_2017-09-07_04-42-21.txt (6.19 KB, Private file)

Reply with quote

Advertisement

You can post new topics in this forum