If you lose a session then the session_onstart code will fire the next time
you hit a page so all of the session variables set in global.asa will always
be valid.
Check the system event logs to make sure something is not re-starting the
ASP application (some AV programs can inadvertently do this by scanning
global.asa all the time). Also, IIRC 2003 supports something called a
"web-garden" in which multiple threads (or maybe processes) are used to
process requests. I don't know if this has any impact on session variables
or not but you might play with the process isolation setting for the virtual
directory.
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Scott Lyon" <scott.red.lyon@blue.rapistan.green.com> wrote in message
news:41114131$1_2@Usenet.com...[color=blue]
> I'm maintaining (read: I didn't write it, nor do I have the time to spend[/color]
to[color=blue]
> rewrite it) an application that is suddenly giving me grief.
>
>
> The reason I say suddenly, is because we're in the process of[/color]
transitioning[color=blue]
> the server on which it runs from Microsoft Windows 2000 Server, to 2003
> server (going from IIS 5 to IIS 6). This problem hasn't really occurred on
> the 2000 server machine, but it's happening MUCH more on the new 2003 box
> (not yet in production, thankfully).
>
>
> Without going into too much detail, the application requires the user to
> login, and once they've entered that, the data goes to a LOGIN.ASP page[/color]
that[color=blue]
> looks up that login/password, and if valid, gets a PersonID, and stores it
> as a Session variable. It then redirects to the MAIN.ASP and never hits
> LOGIN.ASP again (until the user logs out or is timed out after 4 hours).
>
>
> In my GLOBAL.ASA, in the Session_OnStart() function, I'm setting some[/color]
Server[color=blue]
> variables, such as this one:
>
> Session.Contents("Copyright") = "© 2003. All rights reserved."
>
> In the LOGIN.ASP, as mentioned before, it's storing the PersonID as well[/color]
as[color=blue]
> other information, such as follows (just with values hard-coded for this
> example - in reality these are set based on the database query mentioned
> before)
>
> Session.Contents("PersonID")="123456"
> Session.Contents("PersonName")="Fred"
>
>
> If those variables were not set, it would fail when redirected to MAIN.ASP
> (which has not been happening).
>
> Now, here's the problem: Intermittantly, after the LOGIN.ASP page has been
> long processed (and I've been in the web page for a little while, as[/color]
little[color=blue]
> as a few minutes), for no reason Session.Contents("PersonID") suddenly[/color]
goes[color=blue]
> blank. When I check the value of "PersonName", it too is blank.
>
> But if I look at "Copyright" (set in the GLOBAL.ASA), that's intact.
>
>
> What am I missing? How could it be losing just some of the Session
> variables? Especially since the ones set in GLOBAL.ASA should be happening
> first (and not again after that), and that the LOGIN.ASP ones are set[/color]
later,[color=blue]
> how are we losing the LOGIN.ASP-set ones without losing the GLOBAL.ASA[/color]
ones[color=blue]
> too?
>
>
> I hope this isn't too confusing or convoluted.
>
>
> Any ideas?
>
>
> Thanks!
>
> --
> -Scott
>
> (To e-mail me, just remove any color names from my posted e-mail, as well[/color]
as[color=blue]
> any extra periods)
>
>
>[/color]