1

Possible Duplicate:
How to Kill A Session or Session ID (ASP.NET/C#)

If I have the ID of all sessions in a aray, is it possible to verify that the session has timed out and kill it on that basis?

Community
  • 1
  • 1
tarabic
  • 11
  • 2
  • 1
    This question is already asked in SO, go to the following link and make some changes http://stackoverflow.com/questions/5330268/how-to-kill-a-session-or-session-id-asp-net-c or go to the following link http://www.dotnetspark.com/tutorial/3-44-kill-session.aspx – Abdul Rahman Sep 05 '11 at 12:31
  • This is for one session, and the current request. I should check all sessions that are started at some time interval based on the ID that you received when starting and I save in a array (string [] sessions). Is it possible something like this: for (int i = 0 ;i – tarabic Sep 05 '11 at 13:27

1 Answers1

0

Use HttpSessionState.Abandon() method to kill selected session...

And if you want to check session timeouts you can add last usage timestamp to your sessions array, update it on session requests in global.asax handlers...

Łukasz W.
  • 9,538
  • 5
  • 38
  • 63