Session_End and SessionState mode="SQLServer"(softscenario.blogspot.com)
submitted by
animaonline(275) 4 years, 3 months ago
A webapp I'm working on now needs to keep track of the number of logged in users at any time. We used to rely on Session_End for deleting sessions. However, this turned out to work only if the SessionState mode was set to InProc. For other scenarios, Session_End is simply not called. Ever.
So we programmed a background service that polls the database now and then, and deletes from our table the rows that don't exist in the AspState-database (AspState obviously keeps track of timed out sessions and removes them from the table). Clean and simple solution.
|category: C#
|Views: 50
tags:
Scenario software C# another
Everyones tags:
Your Tags: