2 years after, I'm having the same problem that David had.
GetCookie was always returning an empty value but if I put the CookiePath as "/" instead of empty (that by default puts the Application Path) the GetCookie works fine.
Can anyone explain this behaviour?
Thanks,
Francisco Martin wrote:
I've had the same issue just now. Lucky to find this post and get it working.
It would be nice if Outsystems would update their documentation to reflect the proper usage of the CookiePath attribute.
Hi Francisco,
If you look at the SetCookie code you'll understand why if you use empty, it will use the application path
(...) if (ssCookiePath.Length != 0) { oCookie.Path = ssCookiePath; } else { oCookie.Path = "/" + AppInfo.GetAppInfo().eSpaceName + "/" + AppInfo.GetAppInfo().PtaPath;(...)
Filipe Martins wrote:
Can some one guide on where to find such code snippets. I feel understanding the platform from its own back-end would be very helpful rather than just working on the surface.
Thanks
Ashish Sarwal wrote:
Hi Ashish,
As SetCookie is an action from the HTTPRequestHandler extension, you can check it's code by opening the extension through Integration Studio and then check the .NET code in Visual Studio. I believe there are training videos explaining that.
Hope this helps.
Cheers,