korzeniow
korzeniow

Reputation: 321

get session by ID

I'm currently working on Authentication and Membership system for my Web Application. It is licensed to number of users, that can be logged on in the same time.

So I come up with concept that I will make ActiveUsers table where I will store information about logged on users with their sessions' IDs.

Before new user can log in, application will check this table and will get all SIDs, then it will check whether particular session exists on server. If not it will delete record in table.

My question is: is there a way to check if session with particular ID exists on server?

Because HttpContext.Current.Session affects only current user.

Upvotes: 1

Views: 729

Answers (1)

russinkungen
russinkungen

Reputation: 367

There's a whole bunch of nifty events in Global.asax that you can probably use for deleting the row. Check out Session_OnEnd() for instance.

http://msdn.microsoft.com/en-us/library/ms178583.aspx

Edit: Just noticed that this really doesn't answer the question...

Upvotes: 1

Related Questions