Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this message<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
Post Follow-up to this messageJohn 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)
Post Follow-up to this messagesome 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) >
Post Follow-up to this messageKyle 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)
Post Follow-up to this messageashutosh.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"?
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.