For Programmers: Free Programming Magazines  


Home > Archive > ASP > June 2005 > Capturing simultaneous user login.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Capturing simultaneous user login.
ashutosh.bhardwaj1980@gmail.com

2005-06-03, 3:55 am

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

John Blessing

2005-06-03, 8:55 am

<ashutosh.bhardwaj1980@gmail.com> wrote in message
news:1117776300.477918.145310@g44g2000cwa.googlegroups.com...
> 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
>


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


Store the usernames in a database. Because you can never be sure they have
left, implement an inactivity timeout. Call it in your login script to
logout any inactive users.

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


There is no practical way to know when a visitor to your website leaves. See
my first answer.

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


Not with server-side script.


--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook


Evertjan.

2005-06-03, 8:55 am

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?

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Kyle Peterson

2005-06-03, 3:55 pm

some of the systems out there can do it and pretty well
check aspin

http://www.aspin.com/home/webapps/usermanage

its not an easy thing to accomplish



"Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
news:Xns966A70527537Feejj99@194.109.133.242...
> John Blessing wrote on 03 jun 2005 in
> microsoft.public.inetserver.asp.general:
>
>
> 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?
>
> --
> Evertjan.
> The Netherlands.
> (Replace all crosses with dots in my emailaddress)
>



Evertjan.

2005-06-03, 3:55 pm

Kyle Peterson wrote on 03 jun 2005 in
microsoft.public.inetserver.asp.general:
> "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
> news:Xns966A70527537Feejj99@194.109.133.242...

[Please do not toppost on usenet, Kyle]
[color=darkred]
> some of the systems out there can do it and pretty well
> check aspin


What do you mean by "some of the systems"?
We are talking ASP on this NG.

> http://www.aspin.com/home/webapps/usermanage
>
> its not an easy thing to accomplish


So you imply that my easy solution does not work?

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

larrybud2002@yahoo.com

2005-06-03, 3:55 pm



ashutosh.bhardwaj1980@gmail.com wrote:
> 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"?

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com