CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

AJAX error message after session timeout

General discussion

by magosk » 03 Sep 2015 09:33

Hi,

for a mobile web application I have just upgraded to IW 14.0.45 and CG 2.7.0.111. If you are inactive longer than the session timeout and then attempt to perform some action on the page (that has an AJAX event handler on the server), instead of being directed to my "session has expired" page you now get the following alert:

"AJAX request failed: The application server did not respond.

url: https...
callback=...
Method: POST
Status: 400
Status Text: Uninitialized reply."

I am not sure if this is due to a change in the IW core or if it is something with your components. Any idea why this happens and what I should do to restore my old behaviour?

Best regards

Magnus Oskarsson
magosk
 
Posts: 181
Joined: 07 Oct 2013 08:41

by Jorge Sousa » 03 Sep 2015 10:00

Hello

This is due to a change in IW Core a while ago,
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by magosk » 03 Sep 2015 10:38

Hi Jorge and thanks for the quick reply!

Do you know if it is possible to adapt your code to this change and still display a custom session time-out page? Any hint would be much appreciated, we would really like to be able to upgrade to this version ASAP as it includes support for some Samsung mobiles that were previously rejected, and also support for the new Edge browser.

/Magnus
magosk
 
Posts: 181
Joined: 07 Oct 2013 08:41

by Jorge Sousa » 04 Sep 2015 15:23

Hello

As it is the Intraweb code, the only way is if you modify the IWAjax,js in the IW resource files:

Here's the current js code:

Code: Select all
function HandleServerProblem(req) {
    window.serverProblem = true;
    var errMsg = "AJAX request failed: The application server did not respond.\n\nURL: " + req.url + "\nMethod: " + req.method + "\nStatus: " + req.status + "\nStatus Text: " + req.statusText;
   switch(IWAjaxErrorMode){
        case IWAjaxErrorModes.Alert:
         alert(errMsg);
         break;
      case IWAjaxErrorModes.Console:
         consoleError(errMsg);
         break;
    }
    window.serverProblem = false;
}
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests

Contact Us.