Session.Timeout

Discussion in 'Classic ASP' started by vidven, May 7, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Can any one please tell how to track session.timeout in ASP?
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    What do you mean by tracking session.timeout? What are you trying to archieve?

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Please tell me how is it possible with a Text File??
     
  4. I have a session variable(Session("Username")) to store the name of the user logged on. The session time out is set to 10 minutes. If the session of any user is idle to 9 minutes i want to automaticallylog him outand store the log outdetailsin a table.


    As at the endof 10 minutes the Session variables are empty which makes difficult to update the logout details.


    I use login and logout details of the user to display the names of allthe users who have logged on.
    Hope the above expalnation helps to get me a solution.

    Following is what i want to achieve using Classic ASP

    I want to store the login and logout details of the the user with their name,using my application under following cirumstances:
    • User does not use the logout button closes IE
    • Session varaible expires

    Post Edited (vidhya) : 5/9/2006 7:02:45 AM GMT
     
  5. What logout details are you trying to log? I would recommend recording all details during their session instead of during session_end, there are a lot of issues with trying to capture the session_end event.



    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  6. Well even if you use the global.asa file it wont know the users ID .. i tried everything but when a session ends it is gone ..
    Using Application Variables wont work either ..

    Perhaps use a text file to do the work ..?

    Bahamas Security - BahamasSecurity.com
    Bahamas Real Estate - KnowlesRealty.com
     
  7. Then there is JavaScript .... this is just an idea so dont flame me .. /emoticons/smile.gif

    Open a New Window such as an ASP page that logs out the user ..
    You could even center it and have some text saying Logging out .. throw in a timer and then it closes once the timer ends

    Main Logged In Page:
     
  8. Thanks a lot roryknowles,the logic worked..

    This resolves the problem of updating the database when the user closes the browser window.

    I want to log out the user just before the session expires. If the Session time out is set to 10 mins i want to log him out in 9 mins. I tried using counters ,it worked. But i am facing problems in coordinating between the counters on different frames.

    My page has three frames and i have counter on all the pages. The page should be redirected to the login page only if the valueson all the counters is equal to 1.

    I tried using "window.document.formname.counter.value"to retrieve the values,but it does not work.

    Please help me out.

    Regards
    Vidhya
     
  9. Hi, what are the names of all the frames that have counters ..?

    Also, i take it this is all being done in javascript at this point?

    Rory

    Bahamas Security - BahamasSecurity.com
    Bahamas Real Estate - KnowlesRealty.com
     
  10. The names are frame1,frame2 & frame3
     
  11. have you tried ..

    parent.frame2.Myobject

    where myobject is the javascriupt function or embedded object ..
    and frame2 is the frame you are trying to control ..

    Bahamas Security - BahamasSecurity.com
    Bahamas Real Estate - KnowlesRealty.com

    Post Edited (roryknowles) : 5/14/2006 11:00:44 AM GMT
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page