c# 3.0 - File access denied, c# console application error -


This is a strange security problem with the C # (3.0) console application.

The app creates a folder and a bunch of files in that folder makes a copy, it still generates some files and saves them in the same folder. File streams are always closed Copy files copied to File.Copy Once files have been created, I do not seem to be able to use them again - later in the code, if I want to delete or open an existing file, I get an access denied error, I still get that file Made or copied there I know that I have permission!

Visual Studio 2008, Windows 7 (beta) - tried to run as administrator, but it did not help. I also gave the original folder permissions, so that "everyone" entered and entered my logged-in user under the Documents folder.

Thank you!

UPDATE: I tried to do it on XP, the same result was 7:

Does the files get a read only feature set? Trying to remove read-only files can be the reason for throwing an exception from an access.


Comments