This topic is locked

Endless Session

4/18/2013 10:37:18 AM
ASPRunnerPro General questions
S
silk author

hello,

someone knows how to implement a never-expiring authentication process (eg: facobook), based on cookies?

the problem is that ASPR creates many sessions at login based on the user loggin in. I need this since I have some EDIT pages which requre a long time to be filled in, and the session expires losing the changes.

(I can't raise session timeout more than this)
sergey told me he's thinking to this kind of login for a future release, but I need it now <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=20895&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />

any help greatly appreciated, thank you

S
silk author 4/18/2013

a little update wich can be useful to integrate never-expiring login into ASPR
STEP1

I create a cookie with values for each session created by ASPR at login time



For Each item in Session.Contents

If isObject(Session(item)) then

exit for

else

Response.Cookies("usr").Expires = DateAdd("yyyy", 1, Date())

Response.Cookies("usr")(item) = Session.Contents(item)

end if

Next


STEP2

whenever the session ends, I recreate sessions with values stored in the cookie:

For Each Cookie in Request.Cookies("usr")

Session(Cookie) = Request.Cookies("usr")(Cookie)

Next


this code works, but I need the step2 to happen BEFORE any redirect to avoid loosing POST data, any idea?