NetTalk Central

Author Topic: Session expired reseted ...  (Read 7330 times)

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Session expired reseted ...
« on: November 19, 2018, 05:29:21 AM »
Nettalk 10.36.
I have session expired in some apps. I just noticed that if user click on header in some browse, each time the session is reseted to start, for example, 15 min??!
Didnt noticed in previous version?!?!

Not just sorting, every time user click somewhere, for example, row, the timer is reseted?

Regards, Oggy
« Last Edit: November 19, 2018, 05:45:59 AM by oggy »

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #1 on: November 19, 2018, 05:39:04 AM »
What are these settings set to?
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #2 on: November 19, 2018, 05:42:11 AM »
My  settings...

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #3 on: November 19, 2018, 05:46:04 AM »
Is it ran inside a multi site host as a DLL? 
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #4 on: November 19, 2018, 05:48:14 AM »
This is not multi host, and just one exe... I cannot recall if previous version worked like that.... Must find in backup...
Thanks for answering...

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #5 on: November 19, 2018, 05:49:54 AM »
I create the test app from wizard, from beginning, with 10.36 the session is reseted after any of event....?!?!

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #6 on: November 19, 2018, 05:53:08 AM »
Yes.  But I think it's always been that way.

I think the purpose is to end the session after a period of inactivity.

"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #7 on: November 19, 2018, 05:53:54 AM »
I understand that, but the client can keep on clicking in browse for hours without the session got expired...?!?!?!

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #8 on: November 19, 2018, 06:07:21 AM »
So are you wanting to require them to be logged out after a set period of time?

Other than the timer, a logout (which doesn't necessarily end the session), or when the server automatically deletes sessions, I'm not sure.

Maybe a hard coded forced end of the session at a set interval.

Hmmm...interesting.

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #9 on: November 19, 2018, 06:09:44 AM »
Yes, its work like that. If user do not try to click anything, app logged user out and open/reopen login form... 

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #10 on: November 19, 2018, 06:28:04 AM »
Right.  But that's exactly what the timer is for.  It keeps the app alive so long as the user is actively working in it.  Otherwise, they could be in the middle of something and suddenly be logged out.  You could set the timer for a shorter period of time, say 10 minutes.  But, from what your describing, the countdown timer is doing exactly as it was designed.

You could execute custom JS and force the session to end at certain time intervals.  I'm worried you'll have some irritated users.

Here's some of the JavaScript used with the timer (located in netweb.js): 

Called when the user logs in (in PageFooterTag):

startCountDown('& int(p_web.site.SessionExpiryAfterHS/100) &',"'& clip(p_web.site.LoginPage) &'","countdown");

Generated:

startCountDown(3600,"LoginForm","countdown");

In netweb.js -------------------------------------------------------

var cnt=0;
var tcnt=0;
var fcnt='';
var icnt='';

function countDown(){
  hh = parseInt( cnt / 3600 );
  mm = parseInt( cnt / 60 ) % 60;
  ss = cnt % 60;
    var t = hh + ":" + (mm < 10 ? "0" + mm : mm) + ":" + (ss < 10 ? "0" + ss : ss);
  jQuery('#' + icnt).html(t);
  cnt -= 1;
  if (cnt ==0){
    window.open(fcnt,'_top');
  } else {
        setTimeout("countDown();",1000);
  }
};

function resetCountDown(){
  cnt = tcnt;
}

function startCountDown(t,f,i){
  if (t){
        tcnt = t;
    }
    if (f){
        fcnt = f;
    }
    if (i){
        icnt = i;
    }
    cnt = tcnt;
  countDown();
};
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #11 on: November 19, 2018, 06:31:58 AM »
Thank you for explanation. Seems I am too old, because I cannot remember if that session logging is already in older version before 10.36 :)
Will try to use script you posted.
Thanks again.


DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #12 on: November 19, 2018, 07:57:14 AM »
I'm not sure how much I helped but I'm happy to try.

Good luck with it,

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Session expired reseted ...
« Reply #13 on: November 19, 2018, 11:24:07 PM »
Hi Oggy - it's working as it always has - this hasn't changed since NT 4.0 :)

cheers
Bruce

oggy

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • Email
Re: Session expired reseted ...
« Reply #14 on: November 19, 2018, 11:46:10 PM »
Thanks all guys...  :) Must be my years....