Dear All;
I wrote this code in the global.asa but it dosen't work inspite that
it works in any asp file and also in the global.asa file but only in
the session_onstart part.This code is to delete a txt file at the end
of the session.The file was created during the user's session and has
the name of the session id. The session variable "session("mpath")" is
the varible which will hold the path of the created file. This is my
first question also I want to know how to set the session.timeout and
where to place it in the code?
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
sub session_onstart
session("id")=0
session("mpath")=""
end sub
sub session_onend
set fsoglob=server.createobject("scripting.filesystemo bject")
cpath=session("mpath")
set Cfolder=fsoglob.getfolder(cpath)
for each file in Cfolder.files
if instr(1,file.name,session.sessionid&".txt",1) then
fsoglob.deletefile(file)
end if
next
fsoglob.close
set fsoglob=nothing
end sub
</script>
Thank You