reading assession.request.pathinfo error

<< Click to Display Table of Contents >>

Navigation:  Forum >

reading assession.request.pathinfo error

Forum link

 

 

 


 

05-22-2024, 12:33 AM:

 

Hello

 

I am migrating a couple  apps from 

 

IW 14.2.7 to IW 15.2.55.  both use 3rd party CGDevtools components.

 

First app recompiled and works great.  Second app has an app violation and I have isolated it down to a a line that of code not in first app.

 

TIWServerController.IWServerControllerBaseBrowserCheck(  aSession: TIWApplication; var rBrowser: TBrowser);

 

var s0 :  String;

 

begin

 

  s0 := asession.Request.PathInfo;

 

.......

 

This code works and allows me to check path info in IW14 no problem. 

 

In IW15 any idea as to what I am doing wrong here.  I check browser and client info as part of security and also use as part of process to ignore load balancer health checks and closed.

 

I tried this on a test VM with latest IW 15 version and same. Throws access violation. So what is best way to access the request information when new session is created?

 

Thanks.

 

 

 


 

05-22-2024, 07:34 AM:

 

Apparently, since version 15.2.20, you have to set

 

ServerController.SessionOptions.BrowserCheckBeforeNewSession to FALSE

 

(found this in the help file).

 

Cheers, Paul

 

 

 


 

05-22-2024, 12:08 PM:

 

(05-22-2024, 07:34 AM)PaulWeem Wrote: [ -> ]Apparently, since version 15.2.20, you have to set

 

ServerController.SessionOptions.BrowserCheckBeforeNewSession to FALSE

 

(found this in the help file).

 

Cheers, Paul

 

Thanks!  I put that issue aside for a while to solve some other non IW issue.  I have not looked a the help file in a while.  I will spend some time reviewing the various changes in version updats to look for other things i should be aware of smile .

 

 

 


 

06-04-2024, 08:38 AM:

 

Hi Lou,

 

Paul is correct if you want to keep the source as it is.

 

But I definitely would recommend setting

 

ServerController.SessionOptions.BrowserCheckBeforeNewSession = True

 

You just need to check if aSession is assigned.

 

In most ServerController events where a TIWApplication instance is passed as a parameter is a good rule of thumb to check for an assigned aSession parameter before doing anything with it. Some events guarantee to have a valid session, but others don't. That's the case with Browser check event.

 

and change the code.