Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Capturing simultaneous user login.
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


Report this thread to moderator Post Follow-up to this message
Old Post
ashutosh.bhardwaj1980@gmail.com
06-03-05 08:55 AM


Re: Capturing simultaneous user login.
<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



Report this thread to moderator Post Follow-up to this message
Old Post
John Blessing
06-03-05 01:55 PM


Re: Capturing simultaneous user login.
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)


Report this thread to moderator Post Follow-up to this message
Old Post
Evertjan.
06-03-05 01:55 PM


Re: Capturing simultaneous user login.
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)
>



Report this thread to moderator Post Follow-up to this message
Old Post
Kyle Peterson
06-03-05 08:55 PM


Re: Capturing simultaneous user login.
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]

> 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)


Report this thread to moderator Post Follow-up to this message
Old Post
Evertjan.
06-03-05 08:55 PM


Re: Capturing simultaneous user login.

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"?


Report this thread to moderator Post Follow-up to this message
Old Post
larrybud2002@yahoo.com
06-03-05 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:40 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.