This is a very strange problem. If the error log lists the session variables, then they surely exist at the time of the problem. Moreover, FoxWeb will not return an error if you request a session variable that doesn't exist, but rather will return an empty string. Even if you are assigning the return value of Session.GetVar to a regular VFP variable, you should not get a variable not found error, because if the session variable did not exist, the VFP variable would still be assigned an empty string.
I recommend that you use the debugging techniques described in the FoxWeb documentation (http://www.foxweb.com/document/debug.htm) to trace the problem. Start with simple techniques, such as inserting the following code after the line that retrieves the session variable:
Sent by Bob Keller on 02/03/2005 07:02:45 AM:
I 'inherited' what is clearly an app written in the older version of FoxWeb (V1.x). I determined this by the use of legacy FoxWeb commands throughout the application. Due to the nature of the contract I wasn't allowed to do a full re-write and have relied on the compatibility feature in the control panel of version 2.6.
Here is my problem:
1) Using FoxWeb 2.6 with VFP 8.0 SP1 DLLs, I start at a main page that sets and stores user access variables as session variables.
2) As the next page is called through each link, the session variables are retrieved each time for the next page to maintain state throughout the application.
3) On the first time one of the variables is needed on ANY of the subsequent pages, I get a FoxPro error that a variable, which was retrieved as the page was assembled, was not found or defined.
4) By using the browser 'BACK' button, going back to the main page and hitting 'REFRESH' does this totally ELIMINATE this problem. All pages and calls afterward work as though there was nothing wrong. At this time I cannot 'prevent' this error by just inputting a refresh on the home page, or even just hitting REFRESH on the home page. Until you get an error, this does not work.
I looked at the FoxWeb error logs and they show the FoxPro error, but you look at the session variables tab and all the session variables from the main page at instantiation are there. We're currently running this on Windows 2003 Server/IIS 6.0.