Cleaning up after sessions

  • Thread starter Thread starter Mantorok
  • Start date Start date
M

Mantorok

Hi

During use of our ASP.net site users have the ability to upload files to a
temporary area.

What is the ideal way of removing these files when the user has finished (ie
the session has ended)?

Thanks
Kev
 
Mantorok,

I assume there is a way to identify the files based on the session id. So
the easiest way I can think of to do this is to place code to delete those
files into the Global.asax file's SessionEnd method.

This method is called whenever a session ends. There you'll be able to get
the session Id and run your delete code.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
Ok, thanks.

Kev

S. Justin Gengo said:
Mantorok,

I assume there is a way to identify the files based on the session id. So
the easiest way I can think of to do this is to place code to delete those
files into the Global.asax file's SessionEnd method.

This method is called whenever a session ends. There you'll be able to get
the session Id and run your delete code.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top