![]() |
|
reading assession.request.pathinfo error - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: reading assession.request.pathinfo error (/thread-4170.html) |
reading assession.request.pathinfo error - lfeliz - 05-22-2024 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. RE: reading assession.request.pathinfo error - PaulWeem - 05-22-2024 Apparently, since version 15.2.20, you have to set ServerController.SessionOptions.BrowserCheckBeforeNewSession to FALSE (found this in the help file). Cheers, Paul RE: reading assession.request.pathinfo error - lfeliz - 05-22-2024 (05-22-2024, 07:34 AM)PaulWeem Wrote: Apparently, since version 15.2.20, you have to set 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 .
RE: reading assession.request.pathinfo error - Alexandre Machado - 06-04-2024 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. |