I am wrote a file del.asp where I am deleting a file but I am getting the following error

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied
/asptreeview/del.asp, line 9

The code which I wrote is as follows...

PhotoFile = "/asptreeview/asptree/" & Request.QueryString("file")(1)
PhotoPath = Server.MapPath(PhotoFile)
Response.Write(PhotoPath & "<br />")

dim ServerFSO
Set ServerFSO=Server.CreateObject("Scripting.FileSystemObject")
if ServerFSO.FileExists(PhotoPath) then
end if
set ServerFSO=nothing

what is the problem ...can anyone help me???

8 Years
Discussion Span
Last Post by hielo

You will need to give full control to the Folder where the file resides to the IUSR_<machineName> (Where machine name is the name of your computer) user account.


>>How to give full control
Right Click the folder in question > Properties > Security tab > IUSR_machineName

Let permissions propagate to sub-folders as well


I dont see security tab in folder properties I see the following tabs..
general , sharing , websharing , customize I am using windows XP


1. Open Windows Explorer, and choose Folder Options from the Tools menu.

2. On the View tab, scroll to the bottom of the Advanced Settings and clear (click) the check box next to "Use Simple File Sharing."

3. Click OK to apply the change, and you should now have a Security tab when viewing the properties of a file on an NTFS volume.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.