Hi Andrew,
The Session variables are still present in the Session object in the OnEnd event. This means you can use them to retrieve the filename you want to delete.
Using Session_OnEnd is a bit tricky, though. It's not guaranteed that it will fire for each session you create, so you may end up with old files on your server.
You could add a date and time to the filename and then run a routine once in a while that checks old files and deletes them.
Alternatively, and IMO the preferred way , you can use a database to store the data. It's easier to scale a database driven site, than one that uses text files. Also, cleanup tasks are a lot easier in a database.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|