Re: Logged in - Session timeout
From: Rob Meade (robb.meade_at_NO-SPAM.kingswoodweb.net)
Date: 06/06/04
- Next message: Ken Schaefer: "Re: LAST agregate function !!!"
- Previous message: Evertjan.: "Re: LAST agregate function !!!"
- In reply to: Targa: "Logged in - Session timeout"
- Next in thread: Lord Merlin: "Re: Logged in - Session timeout"
- Reply: Lord Merlin: "Re: Logged in - Session timeout"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 06 Jun 2004 12:18:42 GMT
"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: Ken Schaefer: "Re: LAST agregate function !!!"
- Previous message: Evertjan.: "Re: LAST agregate function !!!"
- In reply to: Targa: "Logged in - Session timeout"
- Next in thread: Lord Merlin: "Re: Logged in - Session timeout"
- Reply: Lord Merlin: "Re: Logged in - Session timeout"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|