[ InProc ] about SessionState ; what implies ?

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?...
 
J

Juan T. Llibre

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.
 
K

kferron

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.
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top