Topic "Access to the path 'WinSCPConsoleEventRequest_3908_5474662_340' is denied"

Author Message
bozworthy
[View user's profile]

Joined: 2017-09-07
Posts: 4
Location: US
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)
Advertisements
Guest




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

Guest




Anonymous wrote:
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.


I've added the identity being impersonated to 'Act as operating system' and now the error is "The stub received bad data"
bozworthy
[View user's profile]

Joined: 2017-09-07
Posts: 4
Location: US
Attaching debug log after adding user to higher privilege groups
DEBUG_Log_2017-09-07_04-42-21.txt (6.19 KB) Private file

Description: (none)

Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License