Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 1st, 2007, 12:43 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!
Reply With Quote
  #2 (permalink)  
Old March 2nd, 2007, 07:32 PM
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i had the same problem..here is my story
http://p2p.wrox.com/topic.asp?TOPIC_ID=56087

Reply With Quote
  #3 (permalink)  
Old March 2nd, 2007, 07:35 PM
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
  #4 (permalink)  
Old March 9th, 2007, 07:18 AM
Authorized User
 
Join Date: Jan 2007
Location: , , India.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to saurabhj Send a message via Yahoo to saurabhj
Default

I have a same problem.

Some time it works but not everytime..

Any Solution??



-Saurabh
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:45 AM.


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