Jump to content
Xtreme .Net Talk

ptu

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by ptu

  1. Raven76 I just saw your first response. and it is a typo.
  2. 'Everyone' has full control of the folder directory and the original file. I don't know why neither one of those permissions are inherited...
  3. After adding ASPNET to the administrators group I am able to delete the copied file. However, this is not going to be a valid option because this could create a security hole, "big enough for me to drive my hummer thru". Does anyone know of a way for the file that is copied to simply inherit the original file's permissions?
  4. Two things I should have mentioned... 1. This code is in a web application 2. When I manually view the security properties of temp.txt "everyone" has full control. However, when I try to view the security properties of temp2.txt I get the following dialog box "You do not have permission to view or edit the current permission settings for temp2.txt, but you can take ownership or change auditing settings." VolteFace, I am sure no other program is using "temp2.txt" and this is the only place in my code that references "temp2.txt".
  5. Here's my code System.IO.File.Copy("C:\Program Files\My Program\Temp\temp.txt", "C:\temp2.txt") System.IO.File.Delete("C:\Program Files\My Program\Temp\temp2.txt") I get an exception System.UnauthorizedAccessException "Access to the patch "C:\Program Files\My Program\Temp\temp2.txt" is denied." Are there other classes or methods I could use to workaround this.
×
×
  • Create New...