Query for active SessionID

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to provide a feature which will control access to data within my ASP.Net application. This is an age old problem of locking for edit. While there are many possible ways to solve this, in this case I wish to write the SessionID to a user table in SQL Server, along with the editing user's name. As long as the session is active, all other users will be allowed read access to this data. Once the editing user exits the edit, this record will be cleared to allow the next edit. This is fine if we exit gracefully. However, if the session is lost for whatever reason, this record must be cleared. The app timeout length can vary, and I do not wish to depnd on it

What I would like to do is this: User A acquires lock, SessionID is written to the lock table. User B attempts an edit, A's lock is seen. In order to validate that A is still active, I wish to ask ASP if the SessionID is still active. Is there an API call that I can use to perform this, even something from an obscure library, such as a debug API
 
This cannot be a fat-client solution. My app calls a WebService that could read the database records and should be able to make an API call I believe?
 
Back
Top