473,668 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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).

[UnauthorizedAcc essException: Access to the path
"c:\inetpub\www root\netcat\eng ine\gallery\ima ges\" 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_machinenam e 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 1328
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.goo glegroups.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******@hyp er-typer.com> wrote in message
news:%2******** *******@TK2MSFT NGP15.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).

[UnauthorizedAcc essException: Access to the path
"c:\inetpub\www root\netcat\eng ine\gallery\ima ges\" 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_machinenam e 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="tr ue" />
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.co m.au> wrote in message
news:uj******** ******@tk2msftn gp13.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="tr ue" />
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1837
by: Justin | last post by:
Hi all, Does anybody know a way, in VB.Net, I can discover the file locks on a file on the local machine. I have an application which needs to delete specific files, but I would like to verify in advance whether or not a particular deletion will succeed. Due to other pre-deletion actions, I cannot attempt the deletion and catch the exception if it fails. Thanks in advance
3
1626
by: jaws | last post by:
My problems is as follows. Hope you guys can provide some insight. 1. I have a class which opens a file and simply spits out the text. Methods in place to open, print, close, and delete the file. 2. This class is instantiated as a thread, I have several acting on different files. 3. The application is web based. The user can kill the app. from the browser, effectively leaving my temp files undeleted because the app can
1
2554
by: Sea Sharper | last post by:
I am inside a timer thread and have found that File.Delete is not blocking. File.Delete(x) Checkitexists(x) = true Checkitexists(x) = true Checkitexists(x) = false Not a problem but it would be nice to be warned in the documentation.
3
1675
by: A_Republican | last post by:
I am interested in writing my own secure file deletion program. I want to be able to read and write to my hard drive directly. My application will seach my hard drive for all locations marked for deletion and then replace it with "x" or something that securely removes previoius data. My question is what objects, API calls, etc, etc do I use to read and write directly to the hard drive? -- Regards, Shaun Goldston
6
2049
by: shyam | last post by:
Hi All I had raised a simillar query in an earlier post http://groups.google.com/group/comp.lang.c++/browse_thread/thread/f371af248d90ead6/1d054627402539e1?lnk=gst&q=ofstream+write+failure&rnum=1#1d054627402539e1 Basically I have a file which is opened through ofstream for writing. Now I want to check if the file has been deleted or not, while being in
0
2179
by: ferdz3001 | last post by:
Hi, I have read some of the forums regarding deletion of log files. Just to get more information before I perform the deletion of log files. These are the steps I got: 1. db2 get db cfg <DBSID> 2. search for the "first active log file", then subtract 1 from it. For example i got S0000745.LOG. Subtract 1, that's S0000744.LOG 3. db2 prune logfile prior to S0000744.LOG What is the difference if I simply command the "rm -r <filename>"? I...
1
2105
roswara
by: roswara | last post by:
Dear all, Currently, I am working on a project to make a web-based application using ASP 2.0 and C#. This application will ask user to input for an excel file which has graphs in it. Then the application will grab the graph as image file, and this image will be displayed as thumbnail in the page. Is it possible to accomplish this feature? If it is possible, would you please tell me how? And if it is not possible, why?
4
25857
by: BibhuAshish | last post by:
Hi, I wanted to delete a line from xml file which i did it. But after deletion of that line there is a blank space. Again if i am adding another line by using java that blank line remains as usual. My xml file is ::::::: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <config> <employee id = "1" name = "aa" /> <employee id = "2" name = "bb" />
4
5575
by: gerardianlewis | last post by:
Any help appreciated. (VB.NET under XP and Vista, SP1 installed) My code, inherited from a VB6 version of an app that ran under W98, loads an image from a file into a PictureBox. The user may want to move or delete the file that is being shown. The corresponding event- driven code for "delete this picture" uses: My.Computer.FileSystem.DeleteFile(sPath)
6
4207
by: Bill H | last post by:
I am wondering if this is possible. I have a file that is accessed by multiple users and keeps track of activity (the file is polled by flash every 2 seconds). As users leave, the flash program tells the php program to remove them from the activity file, and as users access this activity file, users who have timed out (haven't been heard from in 60 seconds) are removed. Using a combination of flock, microsecond sleeps, loops and the flash...
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8378
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8577
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2786
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.