System.UnauthorizedAccessException when calling .ShowDialog #68
Unanswered
ejohnson-dotnet
asked this question in
Q&A
Replies: 1 comment
-
Looks like you might be running in a very restricted environment and need to change the permissions to allow your app to write files to your user's temp folder... Or possibly you have an antivirus running that is not trusting your app and blocking it from writing to the temp folder... Unfortunately the API that creates the COM activation context requires a physical file path to read the app manifest, so your app must have the ability to write temporary files in order to use the Task Dialog... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When opening a TaskDialog, I am getting an exception of System.UnauthorizedAccessException.
Here is the exception and stack trace:
System.UnauthorizedAccessException: Access to the path 'C:\Users\username\AppData\Local\Temp\vkofhp5j.qjj' 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)
at Ookii.Dialogs.Wpf.ComCtlv6ActivationContext.EnsureActivateContextCreated() in //src/Ookii.Dialogs.Wpf/ComCtlv6ActivationContext.cs:line 91
at Ookii.Dialogs.Wpf.ComCtlv6ActivationContext..ctor(Boolean enable) in //src/Ookii.Dialogs.Wpf/ComCtlv6ActivationContext.cs:line 36
at Ookii.Dialogs.Wpf.TaskDialog.ShowDialog(IntPtr owner) in //src/Ookii.Dialogs.Wpf/TaskDialog.cs:line 1145
at Ookii.Dialogs.Wpf.TaskDialog.ShowDialog(Window owner) in //src/Ookii.Dialogs.Wpf/TaskDialog.cs:line 1095
Beta Was this translation helpful? Give feedback.
All reactions