I am copying Windows directory from "C:" drive to "E:" drive. When we try to delete this directory from C# application then application throws "Access denied file" exception.
If we try to delete it manually, then it gets deleted successfully.
Loading

Ankur JainPosted Aug 19, 2014, 1:00 PM
have you look at the following thread...
http://www.codeproject.com/Questions/296249/Visual-Studio-Access-Denied-Errors
VulpesPosted Aug 19, 2014, 10:38 AM
The GAC32 and GAC64 directories are, of course, the 'Global Assembly Caches' for 32 and 64 bit .NET applications.
These will contain amongst other things the dlls for the .NET framework classes. So I'd guess that the CLR probably locks them when it loads framework dlls into the current process space.
If that's the case, you'd get an access denied exception because another process is using the directory. However, deleting them manually wouldn't be a problem because the CLR wouldn't be running at that time.
VulpesPosted Aug 19, 2014, 10:02 AM
Wait and see if anyone else has a thought on it.
Gangadhar JadhavPosted Aug 19, 2014, 9:47 AM
VulpesPosted Aug 19, 2014, 9:44 AM
Check out the possible exceptions list in this link:
http://msdn.microsoft.com/en-us/library/62t64db3(v=vs.110).aspx
Gangadhar JadhavPosted Aug 19, 2014, 9:41 AM
VulpesPosted Aug 19, 2014, 9:34 AM
Possibly there's a hidden or system file in there.
Gangadhar JadhavPosted Aug 19, 2014, 9:10 AM
VulpesPosted Aug 19, 2014, 8:58 AM