Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: 14.0.## Restart Sessions Bug (Registered User)



Permlink Replies: 25 - Last Post: Mar 9, 2015 10:07 AM Last Post By: Francesco Fales...
Shane Stump

Posts: 138
Registered: 2/16/01
14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 22, 2014 12:35 PM
Howdy All!!

I decided to give the RestartExpiredSession property a try. When a session is started the first time by a user, I check the parameters to make sure they are valid in the ServerController's OnBrowserCheck event.

I do this by checking the passed in session's Request parameters (TStrings * pParams = pSession->Request->GetParams()).

I also double check when I create my user session by checking the session's RunParameters values.

WHEN A SESSION IS RESTARTED, neither check above passes (i.e. the parameters aren't copied over properly or at all).

Could you please check and fix so I can use the RestartExpiredSession property?

Thanks and Merry Christmas!

Shane
Francesco Fales...

Posts: 21
Registered: 11/12/06
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 12:20 AM   in response to: Shane Stump in response to: Shane Stump
Hello, i also write here to report a problem with restart session.

Let me explain:

1) in 14.0.34 i tried to use RestartExpiredSessions - it worked well
2) i upgraded to 14.0.36 and redeployed the intraweb app - from a browser in which there was a cookie for the old session the app started to reload forever.

Details:
to acces the app I go to http://192.168.48.63:88/

and the browser started reloading very fast at http://192.168.48.63:88/$/StartCheck

I feel there is a bug introduced in versions after 14.0.34 about RestartExpiredSessions.

I hope it is fixed soon.

Note: likely clearing browser cache and cookies works, anyway if it is also a bug it should be addressed.

Edited by: Francesco Faleschini on Dec 23, 2014 12:26 AM
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 1:09 PM   in response to: Francesco Fales... in response to: Francesco Fales...
Francesco Faleschini wrote:
Hello, i also write here to report a problem with restart session.

Let me explain:

1) in 14.0.34 i tried to use RestartExpiredSessions - it worked well
2) i upgraded to 14.0.36 and redeployed the intraweb app - from a browser in which there was a cookie for the old session the app started to reload forever.

Details:
to acces the app I go to http://192.168.48.63:88/

and the browser started reloading very fast at http://192.168.48.63:88/$/StartCheck

I feel there is a bug introduced in versions after 14.0.34 about RestartExpiredSessions.

I hope it is fixed soon.

Note: likely clearing browser cache and cookies works, anyway if it is also a bug it should be addressed.

AFAIK there was no change in those session handling code... We have to test it. I should have an answer soon.
Shane Stump

Posts: 138
Registered: 2/16/01
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 1:28 PM   in response to: Alexandre Machado in response to: Alexandre Machado
Howdy Alexandre!

Please check out what I reported as I need it to be setup like it was an actual new session.

Merry Christmas!

Shane
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 3:37 PM   in response to: Francesco Fales... in response to: Francesco Fales...
Francesco Faleschini wrote:
Hello, i also write here to report a problem with restart session.

Let me explain:

1) in 14.0.34 i tried to use RestartExpiredSessions - it worked well
2) i upgraded to 14.0.36 and redeployed the intraweb app - from a browser in which there was a cookie for the old session the app started to reload forever.

Nothing changed from Iw 14.0.34 to 14.0.36 in respect to expired session handling. I also tested this scenario and could not find any problem at all, meaning that, my expired sessions started just fine. Can you send me a simple test case showing this behavior?
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 8:54 AM   in response to: Francesco Fales... in response to: Francesco Fales...
Francesco Faleschini wrote:
Hello, i also write here to report a problem with restart session.

Let me explain:

1) in 14.0.34 i tried to use RestartExpiredSessions - it worked well
2) i upgraded to 14.0.36 and redeployed the intraweb app - from a browser in which there was a cookie for the old session the app started to reload forever.

Details:
to acces the app I go to http://192.168.48.63:88/

and the browser started reloading very fast at http://192.168.48.63:88/$/StartCheck

I feel there is a bug introduced in versions after 14.0.34 about RestartExpiredSessions.

I hope it is fixed soon.

Hi Francesco,

are you able to reproduce this in a minimal test case application? I tried your approach (leaving an invalid cookie) and the session restarted just fine, as expected.


Note: likely clearing browser cache and cookies works, anyway if it is also a bug it should be addressed.

Edited by: Francesco Faleschini on Dec 23, 2014 12:26 AM
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 3:35 PM   in response to: Shane Stump in response to: Shane Stump
Shane Stump wrote:
Howdy All!!

I decided to give the RestartExpiredSession property a try. When a session is started the first time by a user, I check the parameters to make sure they are valid in the ServerController's OnBrowserCheck event.

I do this by checking the passed in session's Request parameters (TStrings * pParams = pSession->Request->GetParams()).

I also double check when I create my user session by checking the session's RunParameters values.

WHEN A SESSION IS RESTARTED, neither check above passes (i.e. the parameters aren't copied over properly or at all).

Could you please check and fix so I can use the RestartExpiredSession property?

I could NOT reproduce this behavior.

Both events are triggered, and RunParameters work fine. There is some catch though:

In IWSessionList you specify how long will your expired session list persist in memory within your IW applicaiton. The default value is 4 hours. This is how the list initializes:


unit IWSessionList;
....
 
initialization
  TIWExpiredSessionList.InitialCapacity := 100;
  TIWExpiredSessionList.CleanAfterMinutes := 4 * 60; // 4 hours
 
end.


Meaning that:
The list has a initial capacity of 100 elements
The list holds items (expired sessions) on it for 4 hours. If the application shuts down, or this time elapses, then it will remove this expired session from the list.

If you try to restart a session AFTER 4 hours (the default) then the RunParameters will be lost, yes. Is this your case?
Shane Stump

Posts: 138
Registered: 2/16/01
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 3:40 PM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre,

I am running it in my local development machine and for testing set my session time out to 1 minute.

An example session URL in my application is as follows:

https://10.0.2.15:442/$/start?&CompanyID=10&CustomerID=7267

The restarted session is dropping the first & and thus my Name/Value pairs are off.

Hope this helps.

Merry Christmas!

Shane
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 3:46 PM   in response to: Shane Stump in response to: Shane Stump
Shane Stump wrote:
Alexandre,

I am running it in my local development machine and for testing set my session time out to 1 minute.

An example session URL in my application is as follows:

https://10.0.2.15:442/$/start?&CompanyID=10&CustomerID=7267

The restarted session is dropping the first & and thus my Name/Value pairs are off.

Hope this helps.

Merry Christmas!

Shane

It should be:

https://10.0.2.15:442/$/start?CompanyID=10&CustomerID=7267

no?
Shane Stump

Posts: 138
Registered: 2/16/01
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 4:16 PM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
Shane Stump wrote:
Alexandre,

I am running it in my local development machine and for testing set my session time out to 1 minute.

An example session URL in my application is as follows:

https://10.0.2.15:442/$/start?&CompanyID=10&CustomerID=7267

The restarted session is dropping the first & and thus my Name/Value pairs are off.

Hope this helps.

Merry Christmas!

Shane

It should be:

https://10.0.2.15:442/$/start?CompanyID=10&CustomerID=7267

no?

You would know better than I <LOL>!!!

I have been putting the extra & in front of my first parameter. I will try it without and see if the restart session works.

I will report back and thanks!

Merry Christmas!

Shane
Shane Stump

Posts: 138
Registered: 2/16/01
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 23, 2014 4:38 PM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre,

Since I last tested the RestartExpiredSession property, I have updated to the latest CGDevTools 2.5.

If I enable RestartExpiredSession, pages with CGDevTool components that work fine when RestartExpiredSession = False, the active session seems to expire and causes the OnBrowserCheck() / OnNewSession() / OnSessionRestarted() events to fire.

Unfortunately, I have NO CLUE which one of you to report this too (hopefully Pedro is reading this)!!

For now, I guess I will have to not use RestartExpiredSession.

Thanks,

Shane
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 24, 2014 1:49 AM   in response to: Shane Stump in response to: Shane Stump
Shane Stump wrote:
Alexandre,

Since I last tested the RestartExpiredSession property, I have updated to the latest CGDevTools 2.5.

If I enable RestartExpiredSession, pages with CGDevTool components that work fine when RestartExpiredSession = False, the active session seems to expire and causes the OnBrowserCheck() / OnNewSession() / OnSessionRestarted() events to fire.

Unfortunately, I have NO CLUE which one of you to report this too (hopefully Pedro is reading this)!!

For now, I guess I will have to not use RestartExpiredSession.

Thanks,

Shane

OK, I understand. I'll try to reproduce it here again using your exact approach. Then I'll inform you the results, OK?

Best regards
Francesco Fales...

Posts: 21
Registered: 11/12/06
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 12:14 AM   in response to: Alexandre Machado in response to: Alexandre Machado
i also use CgDevTools 2.4.0.119 with IW 14.0.36 and i have the problem with RestartExpiredSession.
Pedro Lopes

Posts: 97
Registered: 3/2/00
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 1:32 AM   in response to: Shane Stump in response to: Shane Stump
Hi Shane

We've not a minimal intervention on RestartExppiredSession. The frontend code cannot influence the IW's backend code.

With best regards

Plp

Shane Stump wrote:
Alexandre,

Since I last tested the RestartExpiredSession property, I have updated to the latest CGDevTools 2.5.

If I enable RestartExpiredSession, pages with CGDevTool components that work fine when RestartExpiredSession = False, the active session seems to expire and causes the OnBrowserCheck() / OnNewSession() / OnSessionRestarted() events to fire.

Unfortunately, I have NO CLUE which one of you to report this too (hopefully Pedro is reading this)!!

For now, I guess I will have to not use RestartExpiredSession.

Thanks,

Shane
Shane Stump

Posts: 138
Registered: 2/16/01
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 7:19 AM   in response to: Pedro Lopes in response to: Pedro Lopes
Howdy Pedro!!!

I will just keep trying the Restart Session option every new version and hopefully it gets resolved. As it currently works, it restarts the session on any of my pages with CGDevTools controls (which are all pages).

Belated Happy New Year!

Shane
Pedro Lopes

Posts: 97
Registered: 3/2/00
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 7:43 AM   in response to: Shane Stump in response to: Shane Stump
Hi Shane

If you had any other controls in your pages, the result would be the same :)

Regards

Plp

On 08/01/2015 15:19, Shane Stump wrote:
Howdy Pedro!!!

I will just keep trying the Restart Session option every new version and hopefully it gets resolved. As it currently works, it restarts the session on any of my pages with CGDevTools controls (which are all pages).

Belated Happy New Year!

Shane

--
http://www.cgdevtools.com

Shane Stump

Posts: 138
Registered: 2/16/01
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 9:14 AM   in response to: Pedro Lopes in response to: Pedro Lopes
Howdy Pedro!!

Since I only use CGDevTools, it was an over simplified statement on my part <LOL>!

Thanks,

Shane
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 8:29 AM   in response to: Shane Stump in response to: Shane Stump
I will just keep trying the Restart Session option every new version and hopefully it gets resolved.

Well... in order to resolve it, first I'll have to reproduce the problem. And I still couldn't reproduce it. In all my tests, all start parameters are kept when the session restarts...
Shane Stump

Posts: 138
Registered: 2/16/01
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 9:16 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
I will just keep trying the Restart Session option every new version and hopefully it gets resolved.

Well... in order to resolve it, first I'll have to reproduce the problem. And I still couldn't reproduce it. In all my tests, all start parameters are kept when the session restarts...

Alexandre,

I have tried to create a "simple" example to demonstrate the problem, but have had no success.

Unfortunately none of my pages are "simple". If you wish to log-in remotely and see it, I am available!! Pedro has remoted in a couple of times to see things that were hard to believe but were true (under the right circumstances)!!

Best regards,

Shane
Chad Hower

Posts: 613
Registered: 3/2/07
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 10:00 AM   in response to: Shane Stump in response to: Shane Stump
On 1/8/2015 1:16 PM, Shane Stump wrote:
I have tried to create a "simple" example to demonstrate the problem,
but have had no success.

This is the problem with HTML and other browser techs. A lot of late
binding and very brittle, which creates situations often out of IW's
control and thus one reason why IW costs as much as it does - support.

Please try to build up one of your simplest pages bit by bit or by
disabling things selectively to see if you can narrow it down to a
reproducible case that we can run locally against our dev source.

--
"Programming is an art form that fights back"
IntraWeb IRC and Web Chat:
http://www.atozed.com/intraweb/Support/IRC.aspx
Shane Stump

Posts: 138
Registered: 2/16/01
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 8, 2015 10:06 AM   in response to: Chad Hower in response to: Chad Hower
Howdy Chad!!

I have already spent hours on it and I will try again when I can come up for air.

Best Regards,

Shane
Francesco Fales...

Posts: 21
Registered: 11/12/06
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2015 3:27 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
I will just keep trying the Restart Session option every new version and hopefully it gets resolved.

Well... in order to resolve it, first I'll have to reproduce the problem. And I still couldn't reproduce it. In all my tests, all start parameters are kept when the session restarts...

I made this video to show the problem (the video focus only on Chrome Address bar): http://www.screencast.com/t/8G7eVXLRF0

To really reproduce the problem i think it is necessary to:
1) create an app with 14.0.34 (with RestartExpiredSessions := True)
2) browse the app with Chrome
3) rebuild the app with 14.0.36
4) try to access again with the same browser -> problem occurs

The problem is visible only if on the browser an older version of the app (built with 14.0.34) was used. This is what i think.

I hope this help.

I noticed this problem on the 14.0.34 - 14.0.36 upgrade.

Edited by: Francesco Faleschini on Jan 9, 2015 3:27 AM

Edited by: Francesco Faleschini on Jan 9, 2015 3:27 AM

Edited by: Francesco Faleschini on Jan 9, 2015 3:28 AM
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 14, 2015 4:54 AM   in response to: Francesco Fales... in response to: Francesco Fales...
Francesco Faleschini wrote:
Alexandre Machado wrote:
I will just keep trying the Restart Session option every new version and hopefully it gets resolved.

Well... in order to resolve it, first I'll have to reproduce the problem. And I still couldn't reproduce it. In all my tests, all start parameters are kept when the session restarts...

I made this video to show the problem (the video focus only on Chrome Address bar): http://www.screencast.com/t/8G7eVXLRF0

To really reproduce the problem i think it is necessary to:
1) create an app with 14.0.34 (with RestartExpiredSessions := True)
2) browse the app with Chrome
3) rebuild the app with 14.0.36
4) try to access again with the same browser -> problem occurs

The problem is visible only if on the browser an older version of the app (built with 14.0.34) was used. This is what i think.

I hope this help.

I noticed this problem on the 14.0.34 - 14.0.36 upgrade.

Ok. I will try it because it may reveal some hidden bug, but I guess this will only happen once, because we changed the session id encoding recently and it may be affecting this.

Thanks
Francesco Fales...

Posts: 21
Registered: 11/12/06
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 23, 2015 10:55 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Hi, I checked IW 14.0.37 release notes and I read
"
Bug fix: Fixed redirection failure during form OnCreate() event.
" (from http://www.atozed.com/IntraWeb/History/XIV/index.EN.aspx)

is this about this thread?

Thanks
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 24, 2015 3:09 PM   in response to: Francesco Fales... in response to: Francesco Fales...
Francesco Faleschini wrote:
Hi, I checked IW 14.0.37 release notes and I read
"
Bug fix: Fixed redirection failure during form OnCreate() event.
" (from http://www.atozed.com/IntraWeb/History/XIV/index.EN.aspx)

is this about this thread?

No, this is about using TerminateAndRedirect() inside the IWForm's OnCreate event.

Till this date, I have never been able to reproduce the error of this thread, and didn't receive any test case showing it. AFAIK, only projects containing 3rd party controls present this behavior, so I'm not sure that this is a IW problem. If you create a new blank IW project you can confirm that the session restart feature works as expected.
Francesco Fales...

Posts: 21
Registered: 11/12/06
Re: 14.0.## Restart Sessions Bug (Registered User)
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 9, 2015 10:07 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
Francesco Faleschini wrote:
Hi, I checked IW 14.0.37 release notes and I read
"
Bug fix: Fixed redirection failure during form OnCreate() event.
" (from http://www.atozed.com/IntraWeb/History/XIV/index.EN.aspx)

is this about this thread?

No, this is about using TerminateAndRedirect() inside the IWForm's OnCreate event.

Till this date, I have never been able to reproduce the error of this thread, and didn't receive any test case showing it. AFAIK, only projects containing 3rd party controls present this behavior, so I'm not sure that this is a IW problem. If you create a new blank IW project you can confirm that the session restart feature works as expected.

Thanks for replying. I still have this subtle behavior from time to time. Anyway it is not a major issue and i had it only on development machine, no one in production found it, so not a big issue.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02