A way to prove that StateServer is working?

  • Thread starter Thread starter geek
  • Start date Start date
G

geek

Hi... I have an asp.net 2.0 application running on iis6 in it's own
pool. The app is set to use a State Server for out of process session
handling. I'm only storing one session variable -- the user's ID code
after a successful login.
All works well, but I don't think it's actually using the State
Server. If I shut down the asp.net state server service, then the
website fails. If I move the state server to another machine, it
works properly too ... shut that service down and it fails too. All
this tells me that it's using an out-of-process state server.
BUT... here are the reasons I believe it is NOT using it:
1. If I recycle the pool, the session variables are lost. According
to all the documentation I read, cycling worker processes should not
affect session variables if they are kept out of process.
2. If I increase the number of worker processes > 1 in the Web Garden,
I get strange results. For example, I need to login X times, where X
is the number of worker processes. This tells me that it's performing
a round-robin between the worker processes and losing my session
variable in each (I am the only tester on this machine).
3. Once logged in X times, I still get logged out sometimes. This
never, ever happens if I reduce the worker processes back to 1.

So, what's the deal? All of these errors are classic in-processes
state errors, but I explicitly have it set to use a state server...
and, shutting down that state server causes a page error. As far as I
know, I should be able to setup a State Server (either on the
localhost or another computer) and all session variables should:
- Survive recycling of worker processes in the application pool
- Survive the round-robin rotation between worker processes in a Web
Garden.

Am I missing something here?
Thanks much for any insight.
 
for security sessions are encrypted. the key is regenerated on a recycle and
is unique to an application instance. you should have set webGarden=true in
the processModel. you may also need to set the machine key.

read the docs about setting up a web farm/ web garden.

-- bruce (sqlwork.com)
 
Yes, thanks for the reply. Of course I've read tons of documentation
on setting up a web farm... I wouldn't have posted to this group
unless I really gave it a good attempt over the span of a week.
I believe it is setup correctly. My question is more to the state
server. The problems I am experiencing (loss of session variables) is
just as if I was using in-proc state server, when in fact I have it
set to use a State Server, either on the local machine or a remote
machine (I've tried both).
So, I am wondering if there is a way to prove that the State Server is
actually handling these requests? The state server service is
running, but how can you be sure it's running out of process using
it? If I cycle the application pool, I lose all session variables.
If I use a web garden, session variables act crazy and get lost. Yet,
the website is set to use out of proc state server. How to make sure
it is actually using it?
Thanks much
 
Back
Top