View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
Sessions are keyed off of a cookie called FW_SessionID.  One characteristic that cookies have is that they will only be sent to the server that originally sent them to the browser.  The way that browsers identify a server is by the server name in the URL.  If the server name changes, then the cookies received by the browser in previous calls are not sent.
If two server identifiers point to the same server, but are not exactly the same (for example localhost and, or and, the browser will still regard them as different servers.  This is why you should never use fully qualified URLs in your links and redirect statements, unless you are sending the user to a different server.
You mention that the cookie disappears after a redirection.  Does your redirect tag specify a fully qualified URL, including a server name?  This is not necessary  -- you only need to use an absolute, or a relative URL, as described in the Locating and Addressing Scripts chapter of the FoxWeb documentation.
One way to diagnose such problems is to compare the Session ID before and after the redirection.  If they are different, then the reason is most probably caused by a change in the server name.

FoxWeb Support Team email

Sent by Jean-François Mathieu on 03/14/2003 06:27:44 AM:
I have a problem with the session objet that seem to not take the value that I give to it or  only take it when he whan.
I whan to use Session Object to be like Auth Object so I have made function to Login, Logout, SetTimeOut... etc... Variable Uername, LoginTime...
Here' how it's work for me:
foxweb.exe call Login?Usename=1&Password=1&Login=1
In fw_enter I check if the user have login=1. If yes I bypass the validation and return to Login.prg
In Login the user is validate and if everyting is ok then i use the code:
Session.SetVar("User") = lcUsename
And I have check and the variable are not empty.
After the program redirect by HTML META tag to the second module Enter.prg
Agains we pass in fw_entre but now Login = "" so a validate if the Session Object have the information Username, LoginTime but it's don't so I'm not login and "kick out". When I check with de fwx that came with foxweb the session variable has noting in except the cookie id, no lasthit, no variable.
If I try a few time with the same session sometime it's pass !
The worst is that in fw_enter I have made the code IF Login = 1 then Session.SetVar("allo","oui") and made write this at the end on Login and it's work but the other value don't pass.
Can somebody help.
Thank for your help
The problem is the the user is found but the code for the session don't seems to work.