advantages of State Server over InProc server

S

Smokey Grindle

What are the advantages of using ASP.NET's session state server service over
using InProc state sessions? Also if you have a state server service
running, is there any way to find out when a session ended? with the inproc
ones you can use the global.asax's session_ended method...
 
E

Eliyahu Goldin

1) Memory consumption. If you store a lot of data in session variables, you
will likely observe that the asp.net process memory grows with time.

2) Restarting IIS won't affect your session variables.

Session_ended event is not very reliable anyway.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
C

Cowboy \(Gregory A. Beamer\)

Technically, the model is supposed to be the same no matter what model. In
reality, there are bumps.

I am not sure about the state_end condition, as I rarely stick things into
session that cannot be automagically cleaned up, if I use session at all.
Someone else will have to tackle that one, but I would assume it works
pretty much the same, with the exception of potentially having that event
fire on multiple machines. No big deal really, as the actual state mechanism
is centralized.

What is the benefit? Scalability primarily. You can add machines to your web
farm without worrying about controlling state. If you have to keep state
over a failure, there is also SQL Server as an option. Note that you do
trade a bit of performance for this scalability.
 
S

sloan

The objects that go into Sql Server state management, must be [Serializable]
fyi.
 
E

Eliyahu Goldin

So too for the outproc Session state service.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


sloan said:
The objects that go into Sql Server state management, must be
[Serializable]
fyi.




Smokey Grindle said:
What are the advantages of using ASP.NET's session state server service over
using InProc state sessions? Also if you have a state server service
running, is there any way to find out when a session ended? with the inproc
ones you can use the global.asax's session_ended method...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top