Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 1st, 2007, 12:43 PM
Registered User
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem deleting folder in Session_OnEnd


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)

     End If

  End Sub

Any idea what is wrong? I've tried to give full control to IUSR_...
Thank you very much!
Old March 2nd, 2007, 07:32 PM
Authorized User
Join Date: Feb 2007
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts

i had the same problem..here is my story

Old March 2nd, 2007, 07:35 PM
Authorized User
Join Date: Feb 2007
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts

the main difference i can see, is try declaring your dims before the _OnEnd

Old March 9th, 2007, 07:18 AM
Authorized User
Join Date: Jan 2007
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to saurabhj Send a message via Yahoo to saurabhj

I have a same problem.

Some time it works but not everytime..

Any Solution??


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem deleting records from a table ghall202 Access 4 March 2nd, 2007 03:58 PM
Deleting Problem vipin.raturi Visual Studio 2005 0 January 4th, 2007 08:15 AM
deleting problem after publishing vipin.raturi ASP.NET 1.0 and 1.1 Professional 0 January 4th, 2007 08:07 AM
deleting problem after publishing vipin.raturi C# 0 January 4th, 2007 08:05 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.