Jump to content

Session management


cristianotestai

Recommended Posts

Hello Farshad,

 

I have some initial questions about management of the session:

 

1) If I close the browser page the session remains active. How to proceed in this case? The session should be terminated, or i'm wrong?

 

2) If I press F5, the application is loaded again and a new session is created. Is this correct? Each F5 a new session is created, without finishing the previous.

 

3) When a session is finished I would go back to my login page, which is the home page of the application, how should I proceed?

I tried putting the code in TerminateTemplates property, but it tries to load, and occurs the error that session was terminated. How to solve this problem?

 

Tks for help!

 

Ps: MainFormDisplayMode = mfPage

Link to comment
Share on other sites

  • Administrators

Hello Farshad,

 

I have some initial questions about management of the session:

 

1) If I close the browser page the session remains active. How to proceed in this case? The session should be terminated, or i'm wrong?

 

Session remains active and automatically terminated after session timeout duration is passed which is 10 minutes by default.

 

2) If I press F5, the application is loaded again and a new session is created. Is this correct? Each F5 a new session is created, without finishing the previous.

 

Yes, the old session remains active and terminated after timeout period.

 

3) When a session is finished I would go back to my login page, which is the home page of the application, how should I proceed?

 

We have issue #855 for this. We will add an event for monitoring session timeouts.

 

You can restart app which will redirect user to login screen.

 

Use below code for InvalidSessionTemplate:

 

<html>
<script>
  document.location="[###url###]";
</script>
</html>

Link to comment
Share on other sites

  • 2 years later...

ServerModule->ServerLimits->SessionRestrict = [srNone, srOnePerIP, srOnePerPC]

 

 

srOnePerIP = Allow only one session per IP address

srOnePerPC = Allow one session per Browser (Tracked by a cookie)

 

That's exactly what I talked about. But I never test it.

 

These days, I just quickly browse the UNIGUI functionality provided, I hope the draft architecture for future project will be come out after that.

 

UNIGUI is quite amazing product.

 

Great job! Farshad!

 

 

Also thanks  Hayri.

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.

×
×
  • Create New...