Jump to content

Question about SessionTimeout


AMIT
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

  • Confused 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...