Mikescher/AlephNote

System.UnauthorizedAccessException: Access to the path 'C:\[Path]\noteapp.config' is denied.

qall opened this issue · 2 comments

qall commented

Hello,
I have this bug when opening the app

System.UnauthorizedAccessException: Access to the path 'C:\[Path]\noteapp.config' 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.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at System.IO.File.WriteAllText(String path, String contents)
   at AlephNote.WPF.Windows.MainWindowViewmodel.SaveSettings()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I have installed it via scoop.sh and this is a work machine.
This is the log attached
Log.txt

Thank you!

Hmm either your user really has no permissions to read/write that file (try putting AlephNote in your users home folder, not C:/Programs or similar).

Or it is the old windows-download problem - try to look into the properties of the files/folders and see if they are blocked (see the README and here.

Third option would be to try to disable UAC and see if it interferes...

Thats not that easy to remote debug, but it does not look like a AlephNote problem but a permission problem on your PC.

qall commented

Thank you for your answer, it works now.