locked
Session Alive Forever? RRS feed

  • Question

  • User877865013 posted
    Is it possible to keep a session alive forever?how do we do that?

    Thnx
    Monday, September 19, 2005 7:47 PM

All replies

  • User553289052 posted
    Nope...When a client removes the session cookie, it's well and truly dead, regardless of what you do on the server-side.
    Monday, September 19, 2005 8:11 PM
  • User877865013 posted

    I have a training app, inwhich there are flash training programs each of 1 hour long. These programs dont understand session. when a user clicks one of them, they go out of session and after 1 hour there is a acknowledgement.asp at the end, here i need to have the user information from the session. How will I have that, if the session ends before that?I cannot use the info from the database bec since the session is dead - I even dont know the login information?

    Can anyone help? On the web server the Session Timeout is 300 minutes which should be more than enough.

    Thnx

     

    Monday, September 19, 2005 8:17 PM
  • User-823196590 posted

    Keep your own cookie on the client and store their "session" data in a data base.  Use the cookie as a key to pull out that data in acknowledgement.asp.

    Tuesday, September 20, 2005 8:11 AM
  • User877865013 posted
    Thanks for your reply. I think I have to use cookies. I have a question with cookies. If no expiration date is set on the cookie then how long will it last...
    Tuesday, September 20, 2005 1:00 PM
  • User553289052 posted
    Thanks for your reply. I think I have to use cookies. I have a question with cookies. If no expiration date is set on the cookie then how long will it last...


    It'll last until the user closes the browser.
    Tuesday, September 20, 2005 1:49 PM
  • User-823196590 posted
    Correct.
    Tuesday, September 20, 2005 2:31 PM
  • User877865013 posted

    Cookies are working temporarily. But it still has couple of problems.

    1. client has to make sure he has cookies 'ENABLED'. I dont know how to check for cookies from flash.
    2. Even though the session is dead, using cookie feature has made the user to go directly to the acknowledgment page (url capture) and submitting it.

    I still cannot understand why, even though the session time is set to 300 minutes, the session is dieing before that time...

     

    Thursday, September 22, 2005 3:17 PM
  • User-823196590 posted
    I still cannot understand why, even though the session time is set to 300 minutes, the session is dieing before that time...

    Check for these things:
    http://www.aspfaq.com/show.asp?id=2157
    Thursday, September 22, 2005 4:22 PM
  • User-1853252149 posted
    1. client has to make sure he has cookies 'ENABLED'. I dont know how to check for cookies from flash.

    Might ask in a Flash support group, much more likely you'll get helped there better than in an ASP Classic group.

    2. Even though the session is dead, using cookie feature has made the user to go directly to the acknowledgment page (url capture) and submitting it.

    Don't have a clue what you mean here.  Cookies have nothing to do with sessions.  You set a cookie for the user to identify them, then record each answer in a database matched to that cookie, usually as an index.  On the final page, you read the database records that match the cookie, and you have your results.  But if you're writing this in Flash, you'll need to do all that in Flash, not ASP.

    As an aside, I'd set an expiration for the cookie, then check the cookie on the first entry page and ask the user if they want to continue that session.  If not, delete the cookie and write a new one, otherwise read the data that matches the cookie and start from that point (record last question answered or the like).  This will keep your users from killing you the first time their internet connection dies and when they reconnect they find they have to start over.

    Jeff 
    Thursday, September 22, 2005 4:28 PM