I am writing an application in c# which saves data to xml. When i reopen the application it says
Access to the path 'C:\ProgramData\Test\abc.xml' is denied.
Can any one pls help me to sort out this problem.
Is there any way to find why access is denied.
You're probably getting this error because you're running Vista or Win7 and you have UAC turned on.
C:\ProgramData requires admin priveledges to write to (but not read from).
I just found this out the hard way because I've been working on a program that was working fine on XP that used System.Environment.SpecialFolder.CommonApplicationData which in Vista refers to the above location and requires elevated privs to write to that directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With