NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: oggy 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
-
What are these settings set to?
-
My settings...
-
Is it ran inside a multi site host as a DLL?
-
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...
-
I create the test app from wizard, from beginning, with 10.36 the session is reseted after any of event....?!?!
-
Yes. But I think it's always been that way.
I think the purpose is to end the session after a period of inactivity.
-
I understand that, but the client can keep on clicking in browse for hours without the session got expired...?!?!?!
-
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
-
Yes, its work like that. If user do not try to click anything, app logged user out and open/reopen login form...
-
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();
};
-
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.
-
I'm not sure how much I helped but I'm happy to try.
Good luck with it,
Don
-
Hi Oggy - it's working as it always has - this hasn't changed since NT 4.0 :)
cheers
Bruce
-
Thanks all guys... :) Must be my years....