By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,016 Members | 1,012 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,016 IT Pros & Developers. It's quick & easy.

preventing multiple logins

P: n/a
one important problem i am facing is that my web solution
(asp.net) will be deployed on a webfarm. I am using sql
server session management on clustered sqlservers. but as
i need to prevent multiple logins through a
username/password (same credentials at a time) on the
website.

also session_end() event does not fire in sql server mode.

one solution is sychronized cache of webservers. and
maintaining usernames (loggedin) in the application cache.
This solution does not look like a robust solution.
suggest a standard solution.
please help me.

Regards
Sameer

Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
A crude method would be to give the user a LastPageAccess property and a
LockedSession boolean property. When a user logs in, you set LastLoggedIn to
GetDate() (assuming SQL Server) and LockedSession to true. When a user logs
out, you set LockedSession to false.

When a user hits another page, update LastPageAccess.

The login rules are then:

LastPageAccess > Timeout
When LockedSession = true

If a user tries to open another session, they are refused. Crude but
effective. It will also teach users to use the log out button rather than
just let sessions timeout.

If you do not want as many hits to the database, you can store user infos in
an Application DataSet or cache of objects. I am not sure of the scalability
of that idea, however.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Sameer" <sa**********@jv.cmc.net.in> wrote in message
news:06****************************@phx.gbl...
one important problem i am facing is that my web solution
(asp.net) will be deployed on a webfarm. I am using sql
server session management on clustered sqlservers. but as
i need to prevent multiple logins through a
username/password (same credentials at a time) on the
website.

also session_end() event does not fire in sql server mode.

one solution is sychronized cache of webservers. and
maintaining usernames (loggedin) in the application cache.
This solution does not look like a robust solution.
suggest a standard solution.
please help me.

Regards
Sameer

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.