Last post Jan 18, 2011 06:36 AM by jiri.formanek
Jan 12, 2011 09:39 AM|jiri.formanek|LINK
we have problem with session state on SQL Server (using standard ASPState db). Every data which are saved to session are identified by some uid (string).
When we used inproc mode, everything is going ok. Using SQL server brought some new problems. The access to the database seems to be configured correctly. But sometimes, some pairs (key,value) are lost. Not whole session data for currect browser, only one or
two keys which were saved recently. It seems that it depends on time period of previous execution, which is weird (for example after 2 minutes). Timeouts are set to many minutes (10 and more).
Any suggestions? Where can be a problem?
As I say, InProc mode works perfectly. Where is difference?
Thanks for any help.
Jan 13, 2011 05:02 AM|SilverNight|LINK
Are you using asp.net 2.0?
As i know ,using InProc or state server still not 100% guarantee the session can keep in long time.
Jan 17, 2011 08:21 AM|jiri.formanek|LINK
After more digging, I found out, that problem is somewhere in IE and session cookie. It works ok in chrome and firefox even with cookie mode of session state. I also tried URI mode of session id, and it works ok also in IE.
What is wrong with IE 8? Does cookie really expire?
We are using asp 4.0.
Jan 17, 2011 10:50 AM|linux|LINK
Can you post code?
Jan 17, 2011 10:54 AM|linux|LINK
Does this help?
Jan 18, 2011 06:36 AM|jiri.formanek|LINK
Thanks for reply.
We found out that state server works ok for us purpose (same as inproc mode) correctly. We dont think that there is a bug in sql server session state , but somewhere in our application which is too complex. The interesting thing is, that state server and
inproc mode work with no problem.
Back to sql state. It seems that session is lost and returned to the past in one moment before our popup box is opened (popup is iframe). The keys that have been already removed (I mean explicitly removed from the session dic) are back in the session and
the most recent keys dissappear, which leads to exception. It is mystery :-)