Re: Debug Log path access issue
Hi Martin, thank you so much, that makes sense now :D
session.DebugLogPath = @"C:\temp\sync\logs\debug\debug.log";
session.DebugLogLevel = 2;
session.DebugLogPath = @"C:\temp\sync\logs\debug";
Error: System.UnauthorizedAccess Exception: Access to the path 'C:\temp\sync\logs\debug' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at System.IO.File.CreateText(String path)
at WinSCP.Logger.SetLogPath(String value)
at WinSCP.Session.set_DebugLogPath(String value)
at WinScp2.Program.Main(String[] args) in C:\test\WinScp2\WinScp2\Program.cs:line 36