Question

The small utility that I've created builds just fine. But when I go to save the file, I get a debugging exception:

System.UnauthorizedAccessException has been thrown, Access to the path "/folder/file is denied.

The location to which I'm trying to write the file would normally require authentication, but my utility is not asking for it when I click save. How can I resolve this?

Was it helpful?

Solution

In general, when you get an UnauthorizedAccessException, you don't have the required security clearance (permission) to execute the action. Have a look at the code in this answer to see how to to get that permission.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top