NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: MikeR on January 18, 2016, 11:10:20 PM
-
I have a nettalk webserver app.
it has different types of users
eg. admin and general users
when certain processes have to be done, its important that no one can continue to update the database until processing is complete.
I have a global variable which an admin user can set to say siteclosed.
I check this in the login form and make sure no general user can signon while the variable is set.
But how do I intercept the next request from a general user that is allready signed on from not doing what they want.
I assume somewhere in the webhandler procedure
But where exactly and how do I notify them ?
-
Hi Bruce just a gentle reminder , yesterday on the webinar you said you would reply to this request when you have time
-
I am also interested of that problem, so I am waiting for any news of that topic.
Regards,
Matthew
-
Hallo Mike,
I keep all active sessions in a table then I loop to session queue and take them out.... Or you can exclude yours and delete the rest.
After you run this code all active user at next request from the server will redirect them to login page.
Hope this will help you.
stt.Trace('wait server')
p_web.requestdata.webserver._Wait()
p_web.RequestData.Webserver._SessionQueue.SessionId = UTI:LastSessionID !This is your sessionID
get(p_web.RequestData.Webserver._SessionQueue, p_web.RequestData.Webserver._SessionQueue.SessionId)
if errorcode()
stt.Trace(errorcode() &' '& error())
ELSE
p_web.RequestData.Webserver._SessionQueue.LoggedIn=0
put(p_web.RequestData.Webserver._SessionQueue, p_web.RequestData.Webserver._SessionQueue.LoggedIn)
Z#=1
!DELETE(p_web.RequestData.Webserver._SessionQueue)
END
p_web.requestdata.webserver._Release()