Results 1 to 3 of 3

Thread: session timeout -session on_end problem

  1. #1

    Thread Starter
    Hyperactive Member jeba's Avatar
    Join Date
    Feb 2000
    Posts
    265

    session timeout -session on_end problem

    Hi there!
    Once a user logs in to my site, he should not be allowed to login from elsewhere. For this reason, I am setting a flag to true in the database when the user logs in, and setting the flag to false when he logs out. This works well, when the user logsout via the 'logout' page in the site. But on the other hand if he closes the browser, I am setting the flag to false in the database in session_onEnd event of global.asa file. But, session_onEnd() event doesn't fire always especially when the server is busy. This is the problem. So if a user forgot to logout, and he comes back next time, still the flag is on. So he is not allowed to logon.
    Please help me. Is there anyother method to solve this problem?


    BTW, does Response.Redirect work in Session_onEnd() event? If so, will it work even when the browser is closed?

    Thanks in advance.
    J£ßä

  2. #2
    Lively Member harsoni's Avatar
    Join Date
    Oct 2000
    Posts
    118

    Lightbulb

    Try avoiding Sessions if u have other means of doing this operation. Why can't you do this in window_onload and
    window_unload functions????


    sonia

  3. #3
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Sonia's got a point, but... sessions expire (about 20 minutes is the default). Why not have this flag expire. This will require a watchdog routine to turn off expired flags, and it will require touching active ones with each action.

    It is just an idea. TIAMTOW.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

Posting Permissions

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



Click Here to Expand Forum to Full Width