p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: Problems with global.asa


Message #1 by "Johannes Hammersen" <Johannes.Hammersen@x...> on Wed, 4 Apr 2001 17:27:11
Did you shut down the application then restart it?  Changes to global.asa do
not take effect until after the app or IIS is restarted.

Rich Cole
Signal Corporation

-----Original Message-----
From: Johannes Hammersen [mailto:Johannes.Hammersen@x...]
Sent: Wednesday, April 04, 2001 1:27 PM
To: Code Clinic
Subject: Problems with global.asa


I have a problem the following code:
---code---
userid = Session("userid")
	Dim objFS
	Set objFS = Server.CreateObject("Scripting.FileSystemObject")
		tmppath = Server.MapPath("/") 
& "\local\vdb\interface\libary\data\user\" & userid & "\pop3\*.*"
	objFS.DeleteFile tmppath, true
	Set objFS = Nothing
---end code---
 is suppost to delete all files in the folder pop3 when the user loggs 
out. The code is working fine because when I place it into an aspfile an 
call it, it works! But when I put it into the global.asa like this :
---code---
Sub Session_OnEnd()
userid = Session("userid")
	Dim objFS
	Set objFS = Server.CreateObject("Scripting.FileSystemObject")
		tmppath = Server.MapPath("/") 
& "\local\vdb\interface\libary\data\user\" & userid & "\pop3\*.*"
	objFS.DeleteFile tmppath, true
	Set objFS = Nothing
End Sub
---end code---
and then call Session.abandon it wont work, I don't even get an error msg.

Why?
Thanks for any help.
Johannes


  Return to Index