File.Delete from ASP.NET

  • Thread starter Thread starter John Smith Jr.
  • Start date Start date
J

John Smith Jr.

I am trying to do a File.Delete(filename) from ASP.NET
and I keep getting an error access denied.

I have granted Full Control over the entire directory the file is in to ASP
machine account.
 
Are you sure that you've granted permissions to the
correct user. By default, this is ASPNET. If this isn't
the problem, then I would strongly suggest using the
FileMon tool available from SysInternals
(http://www.sysinternals.com/ntw2k/source/filemon.shtml).
This tools displays all of the file system access and
the result (in your case, the one you're looking for
would be ACCESS DENIED :). This will help you determine
which user needs to be provided with the appropriate
access level.

Hope this helps.

Bruce Johnson
http://www.ObjectSharp.com/Bruce
 
Back
Top