[ InProc ] about SessionState ; what implies ?

  • Thread starter Thread starter teo
  • Start date Start date
T

teo

I need to use the 'Session_End' event in the 'Global.asax' file.

It only works
if in the 'Web.config' file
the 'sessionState mode' Tag is present
and
its value is set to "InProc"

1)
I thought it was a default setting, wasn't it?

2)
What 'InProc' implies?
More RAM consuming? More time consuming?
If the app will be recycled, all the user around the world will be
affected?...
 
If you need to be assured that Session_End will fire,
InProc is the only option for maintaining session state.

re:
I thought it was a default setting, wasn't it?

It is.

re:
What 'InProc' implies?

It implies that every time the ASP.NET worker process is recycled,
your application will lose its session state ( it will be restarted ).

The reason for that is that : session state, when using InProc, in-process session state management,
session variables are stored in the *same* process as your asp.net application so, if the app is
recycled,
session state management will be recycled, too, wiping out any stored values.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
Storage location

InProc - session kept as live objects in web server (aspnet_wp.exe).
Use "cookieless" configuration in web.config to "munge" the sessionId
onto the URL (solves cookie/domain/path RFC problems too!)

StateServer - session serialized and stored in memory in a separate
process (aspnet_state.exe). State Server can run on another machine

SQLServer - session serialized and stored in SQL server


Performance


InProc - Fastest, but the more session data, the more memory is
consumed on the web server, and that can affect performance.

StateServer - When storing data of basic types (e.g. string, integer,
etc), in one test environment it's 15% slower than InProc. However, the
cost of serialization/deserialization can affect performance if you're
storing lots
of objects. You have to do performance testing for your own scenario.

SQLServer - When storing data of basic types (e.g. string, integer,
etc), in one test environment it's 25% slower than InProc. Same warning
about serialization as in StateServer.
 
Back
Top