[ InProc ] about SessionState ; what implies ?

Discussion in 'ASP .Net' started by teo, Dec 10, 2006.

  1. teo

    teo Guest

    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
    its value is set to "InProc"

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

    What 'InProc' implies?
    More RAM consuming? More time consuming?
    If the app will be recycled, all the user around the world will be
    teo, Dec 10, 2006
    1. Advertisements

  2. If you need to be assured that Session_End will fire,
    InProc is the only option for maintaining session state.

    It is.

    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
    session state management will be recycled, too, wiping out any stored values.
    Juan T. Llibre, Dec 10, 2006
    1. Advertisements

  3. teo

    kferron Guest

    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


    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.
    kferron, Dec 10, 2006
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.