Why does copying a file using FileInfo.CopyTo creates the destination copied file as readonly ?
- by Puneet Dudeja
I have two folders in my asp.net web application in which I create new folders programmaticaly. The entire solution is under VSS source control.
I was not able to manipulate these two folders programmably.
For that, I gave {MACHINE}\ASPNET user account full control over these two folders.
Still, the "access denied to the path" error was coming. I saw that these entire folders were marked readonly. I tried to uncheck Readonly from explorer but not successfull, readonly check does not get removed.
Also, if I copy files using method, the destinationn copied file becomes readonly. I have also tried File.SetAttributes(path,FileAttributes.Normal); but no success.
How can I make the copied file not READONLY ?