AMIT Posted July 27, 2011 Share Posted July 27, 2011 1. Unit of SessionTimeout is in millisecond. If I put zero, does it mean no timeout? 2. When SessionTimeout, Can I override the default message and redirect to the login page? Invalid session or session Timeout. Restart application Quote Link to comment Share on other sites More sharing options...
Tom Posted July 27, 2011 Share Posted July 27, 2011 2. When SessionTimeout, Can I override the default message and redirect to the login page? Invalid session or session Timeout. Restart application Hi amit, yes you can. See ServerModule.ServerMessages property. Here you ll find the output strings and an possibility to implement a login page or an redirection to your login page as well. Here some suggestions: Assign your own html to ServerMessages.InvalidSessionTemplate. You can either implement a html form (a login page) and submit the form values back your UniGui Application for an re-login (see URLParams demo) or code a javascript wiche automatically redirects your user to a new url (i.e. your UniGui application URL). javascript command for a redirect: <script type="text/javascript"> <!-- window.location = "http://www.yourdomain.com" //--> </script> 1. Unit of SessionTimeout is in millisecond. If I put zero, does it mean no timeout? Dont know if session timeout 0 means infinity session lifetime. But you should consider, that UniGui keeps the state of any session in servers memory as long as the sessions' main module (MainModule.pas) will be destroyed. It makes sense to implent a destructor for the main module to release your own object model based on UniGui to release the memory used by a user session. Otherwise you might run out of memory very fast. 1 Quote Link to comment Share on other sites More sharing options...
AMIT Posted July 27, 2011 Author Share Posted July 27, 2011 Hi amit, yes you can. See ServerModule.ServerMessages property. Here you ll find the output strings and an possibility to implement a login page or an redirection to your login page as well. Here some suggestions: Assign your own html to ServerMessages.InvalidSessionTemplate. You can either implement a html form (a login page) and submit the form values back your UniGui Application for an re-login (see URLParams demo) or code a javascript wiche automatically redirects your user to a new url (i.e. your UniGui application URL). javascript command for a redirect: <script type="text/javascript"> <!-- window.location = "http://www.yourdomain.com" //--> </script> Dont know if session timeout 0 means infinity session lifetime. But you should consider, that UniGui keeps the state of any session in servers memory as long as the sessions' main module (MainModule.pas) will be destroyed. It makes sense to implent a destructor for the main module to release your own object model based on UniGui to release the memory used by a user session. Otherwise you might run out of memory very fast. Thank you for your reply. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.