Preventing Session TimeOut


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Preventing Session TimeOut

Hybrid View

  1. #1
    Alejandro Beltran Guest

    Preventing Session TimeOut


    Hi all,

    How do I keep a session from timing out if the user doesn't close the
    browser?

    I tried this:

    <body onload="setTimeout('document.form1.submit()', 9000000)">

    This is supposed to submit the form every 15 minutes and reset the timeout
    for another 15 after loading again. It seems to work, but every time that
    it
    reloads the timeout keeps on getting shorter and shorter.
    Do you know how to fix this or a better way to keep the session from timing
    out?

    Thanks for your help.

  2. #2
    greg Guest

    Re: Preventing Session TimeOut


    if you want to do it for everyone on the web app, its just an easy change
    in the machine.config file...

    <system.web>
    <sessionState
    mode="InProc"
    cookieless="False"
    timeout="5000" -put in any number you want here
    />
    </system.web>



    "Alejandro Beltran" <alejandro@avantext.com> wrote:
    >
    >Hi all,
    >
    >How do I keep a session from timing out if the user doesn't close the
    >browser?
    >
    >I tried this:
    >
    ><body onload="setTimeout('document.form1.submit()', 9000000)">
    >
    >This is supposed to submit the form every 15 minutes and reset the timeout
    >for another 15 after loading again. It seems to work, but every time that
    >it
    >reloads the timeout keeps on getting shorter and shorter.
    >Do you know how to fix this or a better way to keep the session from timing
    >out?
    >
    >Thanks for your help.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center