473,387 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

File.Delete from ASP.NET

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.

Nov 18 '05 #1
2 6647
Nevermind, it was adding the domain account not the local one.
"John Smith Jr." <me@isp.com> wrote in message
news:OV****************@TK2MSFTNGP09.phx.gbl...
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.

Nov 18 '05 #2
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
-----Original Message-----
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 ASPmachine account.

.

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: matt | last post by:
I have compiled some code, some written by me, some compiled from various sources online, and basically i've got a very simple flat file photo gallery. An upload form, to upload the photos and give...
1
by: dominic | last post by:
Hi all, I'm trying to create a temp file by copying from an existing file, perform some operation on the temp file, and then delete it. The code I used is as follow: // First, to copy the...
5
by: Hal Vaughan | last post by:
I have to go through and delete a bunch of files after another program used them. I'm doing: File oFile = new File(fileName); oFile.delete(); if (oFile.exists()) { oFile.deleteOnExit(); } ...
48
by: Joseph | last post by:
Hi I'm writing a commercial program which must be reliable. It has to do some basic reading and writing to and from files on the hard disk, and also to a floppy. I have foreseen a potential...
0
by: SeanR | last post by:
I have a function to copare two files. It will first copy the original file form a different server to a local temp path and then compare that version to a version that has been restored form tape....
23
by: da Vinci | last post by:
Greetings, Onwards with the school studying. Working on a program and need to delete a file from a known location on the hard drive but cannot get anything I do to work. I have tried to use...
7
by: Diggler | last post by:
I have a web application that allows a user to manage files on the server. On the page is a counter that tells them how many files are in their folder. When you delete a file from the folder using...
3
by: Joe | last post by:
Hi, I have written a webpage that allows a user to delete files in asp.net with I am having a small problem. To access this page a user has to login via login.aspx page. After successful...
12
by: Lucas Tam | last post by:
I have a very simple loop: If (Directory.Exists(tempDirectory)) Then Try Dim Files() As String = Directory.GetFiles(tempDirectory) 'Clear out directory For Each Filename As String In Files...
9
by: Paul | last post by:
I'm trying to make get my app to delete all the files in a specified folder and all the files within the folders of the specified folder. e.g. Folder 1 contains three files (File1, File2, File3)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.