Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

bozworthy

Debug log

Attaching debug log after adding user to higher privilege groups
Guest

Re: Debug file attached

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"
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.
bozworthy

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)