Why not?
<script language=vbscript runat=server>
sub session_onStart()
Session("filePath") = Server.MapPath("/") & "\" & Session.SessionID &
".txt"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.CreateTextFile(Session("filePath"), True)
oFile.Write "hey"
oFile.Close : Set oFile = Nothing
Set oFSO = Nothing
End Sub
Sub Session_onEnd()
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.DeleteFile Session("filePath")
Set oFSO = Nothing
End Sub
</script>
I don't know that I personally would want to do this, but this should work,
in theory.
Ray at work
"Soha El-Saeed" <se*******@gawab.com> wrote in message
news:69**************************@posting.google.c om...
I can't use any session variables , properties or methods in the
session_onend event. So the only way is to know if a sessionid still
exists or not to delete the file without using the session_onend
event.
Thank You
Soha El-Saeed
"Ray at <%=sLocation%> [MVP]" <myFirstNameATlane34dotKOMM> wrote in
message news:<OS**************@TK2MSFTNGP12.phx.gbl>...
How about storing the path info in a session variable?
--
Ray at home
Microsoft ASP MVP
"Soha El-Saeed" <se*******@gawab.com> wrote in message
news:69**************************@posting.google.c om... I want to know that a sessionid exists or not because I have created
(on the server) for each user a txt file which has the sessionid as
its name. After the session is ended I have to delete the file , but
of course I can't use the session_onend event because I can't use
server.mappath. That's why I need to know if a sessionid exists or not
so I can delete the corresponding file.
Thank You for your reply.
Soha El-Saeed