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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top