I've encountered a very interesting problem with ASP.NET SQL Server based session state.
I have an application using ASP.NET session configured to use SQL server. The application has an entry point page which takes some data on the query string, does some magic to the data and stores an object in session. After that the page redirects the browser to a new page containing a frame set with 2 frames. Then each frame loads another ASPX.
What's happening is that the entry page loads and does it's thing just fine. Then one frame will load fine, but the other will delivery a server runtime error that the value is not in session. Refresh that error page and it goes away. Sometimes the error will occur on the OTHER frame. The pattern seems to be that the error will occur intermittently on either frame on initial load, but never have I seen it happen on BOTH frames at the same time. And after the first loading of the framed pages the error goes away.
What I'm observing seems to be some kind of latency issue with SQL session state. Almost as if the first page pushes the data off to the session manager but the data isn't making it into SQL server before one of the framed pages loads.
I find it remarkable that this could be the case, but I can't explain it any other way. It also seems like this is some anomaly that results from framed pages. I have worked with SQL server session state in the past on web farms and haven't seem this behavior. My past experience has been in .NET 1.1 scenarios (not 2.0) however that really shouldn't make a difference.
I can not use In-Proc state management (which I believe has proven to fix the problem in testing) because the application is on a server farm.
We have worked around the problem by changing out the frame set for some other layout techniques, but it's not an ideal fix.
Anybody encountered this before or have any ideas?
To pre-answer the obvious questions:
- Yes, state is enabled on the pages that need it.
- Yes, cookies are enabled in my browser.
- Yes, I have properly configured and am connecting to the ASPstate database.
- Yes, my monitor is plugged in and turned on.
- and Yes, my coffee mug holder is retracted and stowed in it's upright and locked position.
-
Peter