I have been writing web applications for several years now. Whether you like sessions or not, I have made REALLY good use of them in classic ASP, .NET 1.1, 2.0 and now 3.5. Oddly enough, I never had an issue where my session was lost unexpectedly in one of my applicaitons until now.
It seems (according to lots of posts out there - and MSDN) that sessions are treated a little differently in .NET. Hmm, really, no kidding! But, the changes made to session management shouldn't cause my user to hit the page and immediately lose their session, right? If so, I am really in trouble, becuase like I said, I likes the sessions.
After reading about a thousand posts that didn't fix my problems and trying every combination of session state management (SQL, StateServer, InProc, BiteMyProc) nothing was working. I actually gave up on it at about 9:30 at night after working on it for 3 hours.
I came back to it yesterday after a not so great night of sleep, but still with a fresh mind. Suddenly it popped into my head that MAYBE the browser/IIS were being somewhat intelligent for me (thanks). MAYBE, since I was only wanting to track the SessionID and didn't store anything into that session as a variable, the system ASSUMED I didn't need that session to stick around. Yep, I put a line of code in my landing page that looked like this: session("hold") = "I cannot believe it was this stupid" and ran my site. There it is, sessionID is persisted.
I wouldn't really care too much about that except that I have done similar things in classic ASP and the session was always maintained even without information stored in it. It would have been nice, and I am pretty sure I have said it before, for Microsoft to document this one a little better (or maybe at all).
Remember Me
a@href@title, strike