Problem deleting folder in Session_OnEnd
Hi,
I get a permission denied error when trying to delete a folder in Session_OnEnd. I am aware that Session_OnEnd is not guaranteed to fire, but it's ok with me.
I've tried the same code in a sample page with a button to create a folder and another button to delete the folder and it works fine. Even if I put files in the folder. Here's the code I have in Session_OnEnd:
Sub Session_OnEnd
Dim fso
dim folder
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(Application("Path") & "\" & Session.SessionID) Then
set folder = fso.GetFolder(Application("Path") & "\" & Session.SessionID)
folder.Delete
End If
End Sub
Any idea what is wrong? I've tried to give full control to IUSR_...
Thank you very much!
|