Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: 404 in Intraweb 14.2.3


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


Permlink Replies: 19 - Last Post: Dec 6, 2017 11:53 AM Last Post By: Alexandre Machado Threads: [ Previous | Next ]
Gerrit Schurer

Posts: 20
Registered: 3/19/04
404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 2, 2017 2:41 AM
Context : Intraweb 14.2.3, Delphi Tokyo 10.2

My Intraweb application has the RestartExpiredSession set to true. In my previous Intraweb version this resulted in a restart of a session whenever I restarted the standalone server application and clicked anything in the old browser session (or waited for an asynchronous timer event to happen). In 14.2.3 I get a 404 error ? Maybe it is a simple setting I missed ? Maybe I can get around it or create a custom 404 page that does the restarting. How can I create such a page ?
Chad Hower

Posts: 613
Registered: 3/2/07
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 3, 2017 7:26 AM   in response to: Gerrit Schurer in response to: Gerrit Schurer
I have tagged Alexandre to look into this.

On 11/2/2017 5:41 AM, Gerrit Schurer wrote:
Context : Intraweb 14.2.3, Delphi Tokyo 10.2

My Intraweb application has the RestartExpiredSession set to true. In my previous Intraweb version this resulted in a restart of a session whenever I restarted the standalone server application and clicked anything in the old browser session (or waited for an asynchronous timer event to happen). In 14.2.3 I get a 404 error ? Maybe it is a simple setting I missed ? Maybe I can get around it or create a custom 404 page that does the restarting. How can I create such a page ?
Mark Johnson

Posts: 10
Registered: 3/16/00
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 3, 2017 7:52 AM   in response to: Gerrit Schurer in response to: Gerrit Schurer
Gerrit Schurer wrote:
Context : Intraweb 14.2.3, Delphi Tokyo 10.2

My Intraweb application has the RestartExpiredSession set to true. In my previous Intraweb version this resulted in a restart of a session whenever I restarted the standalone server application and clicked anything in the old browser session (or waited for an asynchronous timer event to happen). In 14.2.3 I get a 404 error ? Maybe it is a simple setting I missed ? Maybe I can get around it or create a custom 404 page that does the restarting. How can I create such a page ?

I'm also experiencing this but just on async events when the session expires or is invalid from recycling the service.
Zane Leo

Posts: 55
Registered: 12/29/09
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 3, 2017 11:36 AM   in response to: Mark Johnson in response to: Mark Johnson
I am also experiencing this issue since 14.2.3.

It is happening when a user logs out - WebApplication.Terminate ('user logged out').

TIA
Gerrit Schurer

Posts: 20
Registered: 3/19/04
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 4, 2017 8:11 AM   in response to: Mark Johnson in response to: Mark Johnson
Mark Johnson wrote:
Gerrit Schurer wrote:
Context : Intraweb 14.2.3, Delphi Tokyo 10.2

My Intraweb application has the RestartExpiredSession set to true. In my previous Intraweb version this resulted in a restart of a session whenever I restarted the standalone server application and clicked anything in the old browser session (or waited for an asynchronous timer event to happen). In 14.2.3 I get a 404 error ? Maybe it is a simple setting I missed ? Maybe I can get around it or create a custom 404 page that does the restarting. How can I create such a page ?

I'm also experiencing this but just on async events when the session expires or is invalid from recycling the service.

I'm not sure whether it concerns async events. My timer events are async, my events in CGDev radiobuttons as well, I'm not if the Onclick on my CGDev buttons is async, bu probably they are. And yes, only concerning timed-out sessions and after a server restart.
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 4, 2017 10:03 AM   in response to: Gerrit Schurer in response to: Gerrit Schurer
Gerrit Schurer wrote:
Context : Intraweb 14.2.3, Delphi Tokyo 10.2

My Intraweb application has the RestartExpiredSession set to true. In my previous Intraweb version this resulted in a restart of a session whenever I restarted the standalone server application and clicked anything in the old browser session (or waited for an asynchronous timer event to happen). In 14.2.3 I get a 404 error ? Maybe it is a simple setting I missed ? Maybe I can get around it or create a custom 404 page that does the restarting. How can I create such a page ?

What did you mean by "whenever I restarted the standalone server application"?

Did you stop the IW app and restart? I think you can get a new session but if the server is restarted the session info is gone.

Thanks
Dan
Gerrit Schurer

Posts: 20
Registered: 3/19/04
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 5, 2017 6:30 AM   in response to: Dan Barclay in response to: Dan Barclay
Dan Barclay wrote:
Gerrit Schurer wrote:
Context : Intraweb 14.2.3, Delphi Tokyo 10.2

My Intraweb application has the RestartExpiredSession set to true. In my previous Intraweb version this resulted in a restart of a session whenever I restarted the standalone server application and clicked anything in the old browser session (or waited for an asynchronous timer event to happen). In 14.2.3 I get a 404 error ? Maybe it is a simple setting I missed ? Maybe I can get around it or create a custom 404 page that does the restarting. How can I create such a page ?

What did you mean by "whenever I restarted the standalone server application"?

Did you stop the IW app and restart? I think you can get a new session but if the server is restarted the session info is gone.

Thanks
Dan

There is no doubt about the session info; it sure will be gone after timeout/terminate or server restart. With the RestartExpiredSession option the server (previously) started a new session in these circumstances. The user then starts in a new session in the login screen. Now, in 14.2.3, the user gets a 404 error.
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 5, 2017 11:42 PM   in response to: Gerrit Schurer in response to: Gerrit Schurer
Gerrit Schurer wrote:
Context : Intraweb 14.2.3, Delphi Tokyo 10.2

My Intraweb application has the RestartExpiredSession set to true. In my previous Intraweb version this resulted in a restart of a session whenever I restarted the standalone server application and clicked anything in the old browser session (or waited for an asynchronous timer event to happen). In 14.2.3 I get a 404 error ? Maybe it is a simple setting I missed ? Maybe I can get around it or create a custom 404 page that does the restarting. How can I create such a page ?

I'll try to recreate this issue in a new project and let you know ASAP, OK?
Gerrit Schurer

Posts: 20
Registered: 3/19/04
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2017 3:04 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
Gerrit Schurer wrote:
Context : Intraweb 14.2.3, Delphi Tokyo 10.2

My Intraweb application has the RestartExpiredSession set to true. In my previous Intraweb version this resulted in a restart of a session whenever I restarted the standalone server application and clicked anything in the old browser session (or waited for an asynchronous timer event to happen). In 14.2.3 I get a 404 error ? Maybe it is a simple setting I missed ? Maybe I can get around it or create a custom 404 page that does the restarting. How can I create such a page ?

I'll try to recreate this issue in a new project and let you know ASAP, OK?

Yes, please. Thanks !
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 8, 2017 12:03 AM   in response to: Gerrit Schurer in response to: Gerrit Schurer
Gerrit Schurer wrote:
Alexandre Machado wrote:
Gerrit Schurer wrote:
Context : Intraweb 14.2.3, Delphi Tokyo 10.2

My Intraweb application has the RestartExpiredSession set to true. In my previous Intraweb version this resulted in a restart of a session whenever I restarted the standalone server application and clicked anything in the old browser session (or waited for an asynchronous timer event to happen). In 14.2.3 I get a 404 error ? Maybe it is a simple setting I missed ? Maybe I can get around it or create a custom 404 page that does the restarting. How can I create such a page ?

I'll try to recreate this issue in a new project and let you know ASAP, OK?

Yes, please. Thanks !

Hi,

I can identify that a missing field in the AJAX request is causing IntraWeb to wrongly identify the request. This is preventing the session to be re-started.
We already have a fix in place. After finishing our tests we are going to release an update for it.
Gerrit Schurer

Posts: 20
Registered: 3/19/04
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 11, 2017 1:42 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
Gerrit Schurer wrote:
Alexandre Machado wrote:
Gerrit Schurer wrote:
Context : Intraweb 14.2.3, Delphi Tokyo 10.2

My Intraweb application has the RestartExpiredSession set to true. In my previous Intraweb version this resulted in a restart of a session whenever I restarted the standalone server application and clicked anything in the old browser session (or waited for an asynchronous timer event to happen). In 14.2.3 I get a 404 error ? Maybe it is a simple setting I missed ? Maybe I can get around it or create a custom 404 page that does the restarting. How can I create such a page ?

I'll try to recreate this issue in a new project and let you know ASAP, OK?

Yes, please. Thanks !

Hi,

I can identify that a missing field in the AJAX request is causing IntraWeb to wrongly identify the request. This is preventing the session to be re-started.
We already have a fix in place. After finishing our tests we are going to release an update for it.

Hi Alexandre,

That sounds good ! Hoping for a update soon ;-)
Wolfgang Zehntner

Posts: 52
Registered: 9/12/16
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 27, 2017 2:03 AM   in response to: Gerrit Schurer in response to: Gerrit Schurer
I am using newest version of Intraweb 14.2.5, Delphi Tokyo 10.2

I am getting a 404 errorpage (Resource not found). Is this supposed to be fixed in 14.2.5 ?

The error occurs if a 2nd (or 3rd) browserwindow is started and I programmatically terminate the other session-ID.

Please inform me if this is still being worked on ...
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 3, 2017 10:50 AM   in response to: Wolfgang Zehntner in response to: Wolfgang Zehntner
Wolfgang Zehntner wrote:
I am using newest version of Intraweb 14.2.5, Delphi Tokyo 10.2

I am getting a 404 errorpage (Resource not found). Is this supposed to be fixed in 14.2.5 ?

The error occurs if a 2nd (or 3rd) browserwindow is started and I programmatically terminate the other session-ID.

Please inform me if this is still being worked on ...

That depends.... can you identify the request that is causing it? You can identify it from browser, using developer tools (F12) and checking the network tab.

In previous versions a wrongly formatted request could trigger the creation of a new session, which shouldn't occur. This has been fixed and maybe what you are actually seeing is this response. When this happens we have to identify which request is causing it and fix it.
Wolfgang Zehntner

Posts: 52
Registered: 9/12/16
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2017 2:07 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
Wolfgang Zehntner wrote:
I am using newest version of Intraweb 14.2.5, Delphi Tokyo 10.2

I am getting a 404 errorpage (Resource not found). Is this supposed to be fixed in 14.2.5 ?

The error occurs if a 2nd (or 3rd) browserwindow is started and I programmatically terminate the other session-ID.

Please inform me if this is still being worked on ...

That depends.... can you identify the request that is causing it? You can identify it from browser, using developer tools (F12) and checking the network tab.

In previous versions a wrongly formatted request could trigger the creation of a new session, which shouldn't occur. This has been fixed and maybe what you are actually seeing is this response. When this happens we have to identify which request is causing it and fix it.

I uploaded a sample project here:
https://forums.embarcadero.com/thread.jspa?threadID=269501&tstart=0

Please have a look at it.
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 5, 2017 11:52 PM   in response to: Wolfgang Zehntner in response to: Wolfgang Zehntner
Wolfgang Zehntner wrote:
Alexandre Machado wrote:
Wolfgang Zehntner wrote:
I am using newest version of Intraweb 14.2.5, Delphi Tokyo 10.2

I am getting a 404 errorpage (Resource not found). Is this supposed to be fixed in 14.2.5 ?

The error occurs if a 2nd (or 3rd) browserwindow is started and I programmatically terminate the other session-ID.

Please inform me if this is still being worked on ...

That depends.... can you identify the request that is causing it? You can identify it from browser, using developer tools (F12) and checking the network tab.

In previous versions a wrongly formatted request could trigger the creation of a new session, which shouldn't occur. This has been fixed and maybe what you are actually seeing is this response. When this happens we have to identify which request is causing it and fix it.

I uploaded a sample project here:
https://forums.embarcadero.com/thread.jspa?threadID=269501&tstart=0

Please have a look at it.

I'll have a look and let you know ASAP.

Kind regards
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 6, 2017 12:09 AM   in response to: Wolfgang Zehntner in response to: Wolfgang Zehntner
Hi,

I did some testing and I still have some questions about it...
- Do you receive 404 when you post a request from a session which has been already terminated (terminated from another session, through double click in the list box)?
- What is the expected behavior when this happens? I mean.... the session is terminated and you are still trying to post requests to it. How did you handle it before?
Wolfgang Zehntner

Posts: 52
Registered: 9/12/16
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 6, 2017 12:28 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
Hi,

I did some testing and I still have some questions about it...
- Do you receive 404 when you post a request from a session which has been already terminated (terminated from another session, through double click in the list box)?

Yes to above. The session has been terminated, I want it to be invalid because the user has logged in and received a new session.

- What is the expected behavior when this happens? I mean.... the session is terminated and you are still trying to post requests to it. How did you handle it before?

The expected behavior was and should be to display IWSessionInvalid.html
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 6, 2017 12:30 AM   in response to: Wolfgang Zehntner in response to: Wolfgang Zehntner
I think I know what is happening:

please consider this change in your code:


procedure TIWForm1.IWListbox1DblClick(Sender: TObject);
  ...
  
   finally
      GSessions.UnLockList(xList);
      if (App <> nil) and
         (foundit = true) then
         begin
           gSessions.Terminate(App.AppID);    // <- ADD THIS
           // app.Terminate;                  // <- REMOVE THIS
            listsessions;
         end;
   end;
end;
 


This will terminate your session correctly. When you terminate a session from another session you must do it from TIWSessions (GSessions) object. This will terminate the session correctly and remove it from active session list.
After doing this, your code will behave as you expect.

Please let me know how it goes.
Wolfgang Zehntner

Posts: 52
Registered: 9/12/16
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 6, 2017 12:57 AM   in response to: Alexandre Machado in response to: Alexandre Machado
Alexandre Machado wrote:
I think I know what is happening:

please consider this change in your code:

 
procedure TIWForm1.IWListbox1DblClick(Sender: TObject);
  ...
  
   finally
      GSessions.UnLockList(xList);
      if (App <> nil) and
         (foundit = true) then
         begin
           gSessions.Terminate(App.AppID);    // <- ADD THIS
           // app.Terminate;                  // <- REMOVE THIS
            listsessions;
         end;
   end;
end;
 


This will terminate your session correctly. When you terminate a session from another session you must do it from TIWSessions (GSessions) object. This will terminate the session correctly and remove it from active session list.
After doing this, your code will behave as you expect.

Please let me know how it goes.

Good job, it works now as expected.
Alexandre Machado

Posts: 14
Registered: 5/16/15
Re: 404 in Intraweb 14.2.3  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 6, 2017 11:53 AM   in response to: Wolfgang Zehntner in response to: Wolfgang Zehntner
Good job, it works now as expected.

Great!

IIRC, you only need this line in that method:


gSessions.Terminate(App.AppID);
 


TIWSessions.Terminate won't terminate the active session (the session which is actually running that code), so you don't even need to retrieve the session list and compare with current session.
Anyway, your code also works.

Kind regards
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02