Capturing simultaneous user login.

  • Thread starter ashutosh.bhardwaj1980
  • Start date
A

ashutosh.bhardwaj1980

Hi,
I amdeveloping a web site in ASP and it is a secure site. I would like
someone to help me on this:

-->i dont want 2 users to accesss my site with the same username
parallely.

--> Also how can I capture window.close event in my application and
then call a asp script in that function.

--> Is there a way to capture refresh button of IE or netscape.


Waiting for reply,
Thanking you in advance,
Regards,
Ashutosh Bhardwaj
 
E

Evertjan.

John Blessing wrote on 03 jun 2005 in
microsoft.public.inetserver.asp.general:
Not with server-side script.

Start all(!) pages with:

<%
thispage = request.servervariables("PATH_INFO")
if session("thispage")=thispage then response.redirect "/notTwice.asp"
session("thispage")=thispage
%>

Not tested, will this work?
 
L

larrybud2002

Hi,
I amdeveloping a web site in ASP and it is a secure site. I would like
someone to help me on this:

-->i dont want 2 users to accesss my site with the same username
parallely.

Here's what I do:

Create a table with a user_id, session_id as the columns. When a user
logs in, store the user_id and session ID in the table, overwriting any
row that already has the same user_id in there.

Then on each subsequent page (I have the code in the shared toolbar.asp
page), check to see if the current session_id = the session_id in the
table. If it does not, someone else has logged in with the user ID and
the current session is now invalid. forward them to some error or
warning page.

The effect of this is that whatever session has logged in last, wins.
the other session is kicked out. This way, you don't need to know if
someone logged out or not.


--> Is there a way to capture refresh button of IE or netscape.

What do you mean by "capture"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top