I have an application that has been having issues with losing session, and I'm almost positive it has to do with the application pool recycling too often.
I wanted to try an out of process solution and have configured SQLServer sessionState, but when I recycle the worker process my session is still being blown away. Here is my web.config
<sessionState cookieless="false" stateConnectionString="tcpip=localhost:42424" mode="SQLServer" sqlConnectionString="Data Source=(local;User ID=user;Password=password" timeout="180" />
I've ran the appropriate sql scripts to setup the database and I can see that a session is created and stored in the database, but if i change the web.config or manually recycle the worker process my session is lost. What am I doing wrong??
Side note, I'm receiving the exact same behavior with StateServer mode. I seemingly configure it properly, I can see the State service memory footprint get bigger when I login ....I tried to push a non serialized object into and received an error....but when I recycle the app pool or change the web.config I lose session....
I've also tried to set up the Memcached session provider (which is what I would really like to use) that can be found here: http://memcachedproviders.codeplex.com/releases/view/10468
and it is also doing the same thing! I can see the session being created in the database, and I will get an error pertaining to serialization when I try to interact with a non-serialized object....but I lose the session when the app pool is recycled.
After enabling some logging I'm seeing this in the event viewer:
Event code: 1003 Event message: Application compilation is starting
Nobody?? I really need to get out of process session state working....help!!