File Deletion Problem

B

BlueFrog

Hi all,

I'd appreciate some ideas on this as I've just spent the last 2 hours trying
to solve it to no avail.

I'm am building a web application which includes the functionality to upload
images which are then resized to two thumbnail sizes and the original file
is then deleted - works fine. In another part of this application I wish to
be able to delete these thumbnail files from a datalist using the
system.io.file.delete method in VB.NET but keep getting the error below when
I try to do so on my local development machine (XP Professional).

[UnauthorizedAccessException: Access to the path
"c:\inetpub\wwwroot\netcat\engine\gallery\images\" is denied.]
System.IO.File.Delete(String path) +264

I have confirmed that the file path and file name being sent to the delete
method are correct.

Things I've tried to resolve this:
1. Gave the ASP.NET account full permissions on the folder
2. Gave the iusr_machinename account full permissions on the folder
3. Gave the everyone account full permissions on the folder.
(I have checked that these permissions are propegating down to the files in
the folder correctly.

I still get the same error. Disabled my virus software (AVAST), still no
success.

Tried impersonation by putting a web.config file in the folder with my login
details - no joy.

Anyone got any other ideas - this is driving me nuts.

One thing I did notice and I don't know if this has any importance but the
owner/creator account doesn't have any rights nor could I apply any.

Very Blue Frog
 
P

Patrick Olurotimi Ige

BlueFog,
U must be missing something simple try looking through ur
permmisions again..
And can u post ur Web.Config and how u added ur login details u might me
doing that incorrectly.
or maybe just add :=
<identity impersonate="true" />
to ur web.config.
Hope it helps
Patrick
 
B

BlueFrog

Thanks Patrick - my checking on this has been pretty exaustive and
exausting - I'll take another look tomorrow but I'm sure that the
permissions on the folder are set up correctly

Joe
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top