469,920 Members | 2,241 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

File Deletion Problem

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\imag es\" 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
Nov 19 '05 #1
5 1233
I know you said you tried changing security permissions but try reading
this:
http://www.asp.net/security.aspx?tabindex=0&tabid=1

Hope it helps. :)

Nov 19 '05 #2
Unfortunately I've been taken all this advice without success.

Joe

"Chad Devine" <su*****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I know you said you tried changing security permissions but try reading
this:
http://www.asp.net/security.aspx?tabindex=0&tabid=1

Hope it helps. :)

Nov 19 '05 #3
Still no progress on this one - anyone???????

"BlueFrog" <bl******@hyper-typer.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
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\imag es\" 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

Nov 19 '05 #4
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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #5
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

"Patrick Olurotimi Ige" <ig*@iprimus.com.au> wrote in message
news:uj**************@tk2msftngp13.phx.gbl...
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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Justin | last post: by
3 posts views Thread by jaws | last post: by
1 post views Thread by Sea Sharper | last post: by
3 posts views Thread by A_Republican | last post: by
4 posts views Thread by gerardianlewis | last post: by
6 posts views Thread by Bill H | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.