+ Reply to Thread
Results 1 to 7 of 7

Thread: Session Timeout Warning

  1. #1
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,382
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Session Timeout Warning

    This should be an easy one, and Mr. Google and I could probably figure it out, but I figure somebody would know off the top of the head.

    Our internal application is of the kind wherein users tend to leave a data entry screen up all day, make periodic entries and then try to save the changes. Of course, by then the session has expired, and the corporate security kicks in (really old homegrown code). At this point, we have lost all the session information, and thus can not process the data. (This app is going to be rewritten next year, so we'll fix a lot of these issue at the core then).

    I've seen a number of sites that pop up a message just prior to the session timeout -- basically saying, do some or else. I'd like to add this to at least give our users the chance to save the changes before they go poof.

    Probably easy, just need a point the right direction.
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  2. #2
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    What is the site written in?

    In an ASP.NET app I had a JS countdown and when it expired a control popped up with a button they could click to remain logged in. When they clicked it, a asmx webservice would fire that renewed the ticket.

    I also had a JS code that saved every form element into a 2dimensional cookie form element id : value and when they logged back in it retrieved this cookie and repopulated the form elements.

    Probably a bit out of date now, but I could post the code if it would help?

  3. #3
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,382
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Hmmm..knowing what the site is written in helps?

    It's in Coldfusion. If you don't know, think of it as along the lines of ASP Classic or PHP; or even straight HTML.
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  4. #4
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    If you do any refresh on the page, then you'd have to have some method of saving the current values when they refresh.

    So, it'd have to be an async postback. Can this be done with CF? Also, what would happen if they don't refresh the session? They'd lose the values they have in the form?

  5. #5
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,533
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  6. #6
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,382
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Yes, the values are POSTed back to the server. State management is up to the developer in CF so we do save everything and post it back on error. I think the problem comes in where the security app gets it muddy hands in there. We redirect to the security app and it redirects back. I haven't confirmed it, but by that time I think the posted info is gone (security concerns).

    All that will be addressed when we make this an ASP.NET app.

    If it turns out to not be a quick and dirty fix, then I'm all for reminding the users to save early and save often.
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  7. #7
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,382
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Thanks @jmh -- I'll give that a go and see if it shakes out (or if our security Nazis complain -- the world would end if we left a session idle for more than 20 minutes!)
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

+ Reply to Thread

Similar Threads

  1. Session.Abandon
    By Centurion in forum ASP Development
    Replies: 11
    Last Post: January 9th, 2010, 03:39 AM
  2. Timeout error
    By micky in forum MySQL
    Replies: 5
    Last Post: December 30th, 2009, 06:18 AM
  3. Session variable not querying??
    By Centurion in forum ASP Development
    Replies: 7
    Last Post: December 3rd, 2008, 11:35 AM
  4. Forms Authentication Session Staying Open
    By richyrich in forum .NET Development
    Replies: 1
    Last Post: July 5th, 2008, 01:30 PM
  5. HttpException - Session State not enabled.
    By Wolffy in forum .NET Development
    Replies: 3
    Last Post: May 21st, 2008, 10:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO