views:

217

answers:

2

My application (vb.net) sometimes throws an "access denied" exception when attempting to delete files in the AppData folder and I'm not sure why.

I confirm that the file exists before attempting to delete it and have not done anything to make it readonly, etc.

The interesting thing is that it seems to go okay when I'm logged in with Admin rights. However, I thought that the AppData folder did not require admin rights.

Any help would be greatly appreciated!

Thanks!

Dave

A: 

Maybe these files were created when you launched your application being logged on as Admin? So you get this error when you try to delete them later as normal user.

Dmitry
A: 

It is not necessarily the folder, but the Owner of the file you are trying to interact with. If the File is owned by Administrators, you may have problems.

John Christman