Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: Intraweb session


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 5 - Last Post: Sep 21, 2017 3:05 AM Last Post By: Ammu T
Ammu T

Posts: 9
Registered: 10/7/17
Intraweb session  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 19, 2017 2:20 AM
I am using Intraweb 12.
I want to redirect to login page when session timeout occurs.
For that I have set the 'sessiontimeout' property to 10 in servercontroller.

Also wrote redirect code in IWServerControllerBaseCloseSession event of servercontroller

Procedure TIWServerController.IWServerControllerBaseCloseSession
(ASession: TIWApplication);
Begin
If Assigned(dClntDataMain) Then
Begin
dClntDataMain.Items[ASession.SessionTimeStamp].Free;
dClntDataMain.Remove(ASession.SessionTimeStamp);

WebApplication.TerminateAndRedirect(WebApplication.ApplicationURL);
End;
End;

But still the page redirects to a blank page. Can someone suggest me what is wrong in my method.
Pete d'Oronzio

Posts: 25
Registered: 10/31/00
Re: Intraweb session  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 19, 2017 11:18 AM   in response to: Ammu T in response to: Ammu T
Ammu,

I think that by the time BaseCloseSession has been called, the
communication between the browser and the server is already done. It's
just for cleaning up.

I just finished jumping from IW 10 to 14. In IW 10, there was a server
controller property called SessionTimeoutURL. I believe a similar
property exists in the session itself as well. Set that to your
desired location and all closed sessions will go there.

Pete

Ammu T wrote:

I am using Intraweb 12.
I want to redirect to login page when session timeout occurs.
For that I have set the 'sessiontimeout' property to 10 in
servercontroller.

Also wrote redirect code in IWServerControllerBaseCloseSession event
of servercontroller

Procedure TIWServerController.IWServerControllerBaseCloseSession
(ASession: TIWApplication);
Begin
If Assigned(dClntDataMain) Then
Begin
dClntDataMain.Items[ASession.SessionTimeStamp].Free;
dClntDataMain.Remove(ASession.SessionTimeStamp);

WebApplication.TerminateAndRedirect(WebApplication.ApplicationURL);
End; End;

But still the page redirects to a blank page. Can someone suggest me
what is wrong in my method.

Ammu T

Posts: 9
Registered: 10/7/17
Re: Intraweb session  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 20, 2017 4:13 AM   in response to: Pete d'Oronzio in response to: Pete d'Oronzio
Thank you Pete for your reply.

But i couldn't see the property 'SessionTimeoutURL' im servercontroller could you please tell me what could be wrong, or how can I set it.

Also I couldn't I don't know how to set it in session itself.


Pete d'Oronzio wrote:
Ammu,

I think that by the time BaseCloseSession has been called, the
communication between the browser and the server is already done. It's
just for cleaning up.

I just finished jumping from IW 10 to 14. In IW 10, there was a server
controller property called SessionTimeoutURL. I believe a similar
property exists in the session itself as well. Set that to your
desired location and all closed sessions will go there.

Pete

Ammu T wrote:

I am using Intraweb 12.
I want to redirect to login page when session timeout occurs.
For that I have set the 'sessiontimeout' property to 10 in
servercontroller.

Also wrote redirect code in IWServerControllerBaseCloseSession event
of servercontroller

Procedure TIWServerController.IWServerControllerBaseCloseSession
(ASession: TIWApplication);
Begin
If Assigned(dClntDataMain) Then
Begin
dClntDataMain.Items[ASession.SessionTimeStamp].Free;
dClntDataMain.Remove(ASession.SessionTimeStamp);

WebApplication.TerminateAndRedirect(WebApplication.ApplicationURL);
End; End;

But still the page redirects to a blank page. Can someone suggest me
what is wrong in my method.

Pete d'Oronzio

Posts: 25
Registered: 10/31/00
Re: Intraweb session  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 20, 2017 7:04 AM   in response to: Ammu T in response to: Ammu T
Hmm. They must've removed it before v12. (like I said, I used it in v10)
I'll see if I can find how to do it in 14. Hopefully that will be the
same as 12.

Ammu T wrote:

Thank you Pete for your reply.

But i couldn't see the property 'SessionTimeoutURL' im
servercontroller could you please tell me what could be wrong, or how
can I set it.

Also I couldn't I don't know how to set it in session itself.


Pete d'Oronzio wrote:
Ammu,

I think that by the time BaseCloseSession has been called, the
communication between the browser and the server is already done.
It's just for cleaning up.

I just finished jumping from IW 10 to 14. In IW 10, there was a
server controller property called SessionTimeoutURL. I believe a
similar property exists in the session itself as well. Set that to
your desired location and all closed sessions will go there.

Pete

Ammu T wrote:

I am using Intraweb 12.
I want to redirect to login page when session timeout occurs.
For that I have set the 'sessiontimeout' property to 10 in
servercontroller.

Also wrote redirect code in IWServerControllerBaseCloseSession
event of servercontroller

Procedure TIWServerController.IWServerControllerBaseCloseSession
(ASession: TIWApplication);
Begin
If Assigned(dClntDataMain) Then
Begin
dClntDataMain.Items[ASession.SessionTimeStamp].Free;
dClntDataMain.Remove(ASession.SessionTimeStamp);

WebApplication.TerminateAndRedirect(WebApplication.ApplicationURL)
; End; End;

But still the page redirects to a blank page. Can someone suggest
me what is wrong in my method.

Pete d'Oronzio

Posts: 25
Registered: 10/31/00
Re: Intraweb session  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 20, 2017 7:23 AM   in response to: Ammu T in response to: Ammu T
Just came across this:
http://www.codenewsfast.com/cnf/thread/0/permalink.thr-ng1940q12652
Read down to towards the bottom. It points to IW Demos that do this.

-Pete

Ammu T wrote:

Thank you Pete for your reply.

But i couldn't see the property 'SessionTimeoutURL' im
servercontroller could you please tell me what could be wrong, or how
can I set it.

Also I couldn't I don't know how to set it in session itself.


Pete d'Oronzio wrote:
Ammu,

I think that by the time BaseCloseSession has been called, the
communication between the browser and the server is already done.
It's just for cleaning up.

I just finished jumping from IW 10 to 14. In IW 10, there was a
server controller property called SessionTimeoutURL. I believe a
similar property exists in the session itself as well. Set that to
your desired location and all closed sessions will go there.

Pete

Ammu T wrote:

I am using Intraweb 12.
I want to redirect to login page when session timeout occurs.
For that I have set the 'sessiontimeout' property to 10 in
servercontroller.

Also wrote redirect code in IWServerControllerBaseCloseSession
event of servercontroller

Procedure TIWServerController.IWServerControllerBaseCloseSession
(ASession: TIWApplication);
Begin
If Assigned(dClntDataMain) Then
Begin
dClntDataMain.Items[ASession.SessionTimeStamp].Free;
dClntDataMain.Remove(ASession.SessionTimeStamp);

WebApplication.TerminateAndRedirect(WebApplication.ApplicationURL)
; End; End;

But still the page redirects to a blank page. Can someone suggest
me what is wrong in my method.

Ammu T

Posts: 9
Registered: 10/7/17
Re: Intraweb session  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 21, 2017 3:04 AM   in response to: Pete d'Oronzio in response to: Pete d'Oronzio
Thank you Pete

It worked for me :)

In servercontroller set property TimeoutResponse = IWURLResponderRedirect

and in TIWURLResponderRedirect set

url = <url, where you want to redirect the page after timeout occurs>
e.g http://127.0.0.1:85

Pete d'Oronzio wrote:
Just came across this:
http://www.codenewsfast.com/cnf/thread/0/permalink.thr-ng1940q12652
Read down to towards the bottom. It points to IW Demos that do this.

-Pete

Ammu T wrote:

Thank you Pete for your reply.

But i couldn't see the property 'SessionTimeoutURL' im
servercontroller could you please tell me what could be wrong, or how
can I set it.

Also I couldn't I don't know how to set it in session itself.


Pete d'Oronzio wrote:
Ammu,

I think that by the time BaseCloseSession has been called, the
communication between the browser and the server is already done.
It's just for cleaning up.

I just finished jumping from IW 10 to 14. In IW 10, there was a
server controller property called SessionTimeoutURL. I believe a
similar property exists in the session itself as well. Set that to
your desired location and all closed sessions will go there.

Pete

Ammu T wrote:

I am using Intraweb 12.
I want to redirect to login page when session timeout occurs.
For that I have set the 'sessiontimeout' property to 10 in
servercontroller.

Also wrote redirect code in IWServerControllerBaseCloseSession
event of servercontroller

Procedure TIWServerController.IWServerControllerBaseCloseSession
(ASession: TIWApplication);
Begin
If Assigned(dClntDataMain) Then
Begin
dClntDataMain.Items[ASession.SessionTimeStamp].Free;
dClntDataMain.Remove(ASession.SessionTimeStamp);

WebApplication.TerminateAndRedirect(WebApplication.ApplicationURL)
; End; End;

But still the page redirects to a blank page. Can someone suggest
me what is wrong in my method.


Edited by: Ammu T on Sep 21, 2017 3:05 AM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02