Re: Logged in - Session timeout
From: Lord Merlin (SPAM_LordMerlin_at_Bonzai.org.za_SPAM)
Date: 06/06/04
- Next message: Lord Merlin: "Re: ASP performance issues"
- Previous message: Martin CLAVREUIL: "Re: Error Trapping the dreaded refresh"
- In reply to: Rob Meade: "Re: Logged in - Session timeout"
- Next in thread: Rob Meade: "Re: Logged in - Session timeout"
- Reply: Rob Meade: "Re: Logged in - Session timeout"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 6 Jun 2004 23:20:19 +0200
This raise a question though. Can't you use sessions instead of the
quesrystring method, ie, instead of doing
http://www.your-domain.com/login.asp?url=http://www.your-domain.com/surprise
.asp?kbid1234
You have that info in a session, and then simply send them to :
http://www.your-domain.com/login.asp
login.asp will check if that session'ed URL exists, else redirect them to
the homepage?
-- Kind Regards Rudi Ahlers +27 (82) 926 1689 Greater love has no one than this, that he lay down his life for his friends (John 15:13). "Rob Meade" <robb.meade@NO-SPAM.kingswoodweb.net> wrote in message news:CYDwc.1294$be4.14381111@news-text.cableinet.net... "Targa" wrote ... > How can I return them to the page they were on when the session timed out, > rather than starting over on the homepage? Hi Targa, We wrote something at work that would do this for exactly the same purpose - dont have the code to hand, but basically you need to send a URL to your login page - which then redirects the user to that URL...you need to also take any querystring info with it that you may need.... ie.. Page you're on before time out occurs: http://www.your-domain.com/surprise.asp?kbid=1234 Now the users times out and you redirect them to your login page, at this point we created the URL and querystring and put it into a new querystring value for the redirect, ie... http://www.your-domain.com/login.asp?url=http://www.your-domain.com/surprise .asp?kbid1234 within your login code you'd need to check to see if URL in the querystring existed, if it does, takes its value and use that as the redirect instead of going to your home page. Somethings we found were that you'll need to URL encode the URL you are going to redirect to BEFORE you add it to the querystring returning to the login page, this was because it will other wise take only the first part of the querystring, and not anything which you may have after &'s etc... ie.. http://www.your-domain.com/surprise.asp?kbid=1234&sid=5678 when it reads that it'll only use the first part, ie. http://www.your-domain.com/surprise.asp?kbid=1234 and assume that the &sid=5678 belonged to the login page (ie, it gets lost) Use Server.URLEncode before adding the URL to the login pages redirect and you'll be fine. Incidentally, we built the URL and querystring from stratch to a new variable as some of our websites use SSL (ie, https) and others dont (http) so we wanted to ensure that we always took them to the correct place. I trust this is of some use... Regards Rob
- Next message: Lord Merlin: "Re: ASP performance issues"
- Previous message: Martin CLAVREUIL: "Re: Error Trapping the dreaded refresh"
- In reply to: Rob Meade: "Re: Logged in - Session timeout"
- Next in thread: Rob Meade: "Re: Logged in - Session timeout"
- Reply: Rob Meade: "Re: Logged in - Session timeout"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|