Thought I'd post this in case it's useful to other searchers in the future.
On one of my sites I noticed that session variables had suddenly stopped
persisting across pages. Some things I had done that may have caused this
included installing the .Net framework on my server, and installing VS.Net
EA on my workstation. I had also migrated the server to active directory.
All of a sudden session variables were loosing their values if persisted
across pages (i.e. they still seemed to work on the same page on which the
value was assigned). The site concerned had an underscore in it's name. This
turned out to be the problem.
The problem was fixed by adding another identity to the site with a hostname
does not include an underscore. Open properties for the site in question and
on the Web Site tab click the Advanced... button. Use the same IP address
and Port for the new identity, but add a host header name without an
underscore. Add a new DNS alias record if required.
Make sure you browse the site using this new hostname. I left the old
hostname set up (the one with the underscore) so I didn't have to change
references in Interdev, etc. Fixed it for me.
Someone might like to comment on what the specific cause of this problem is.
Hope this helps,
Alan