WHAT ARE THE SESSION STATE MODES? DEFINE EACH SESSION STATE MODE SUPPORTED BY ASP.NET.

Pushpendra Singh

Total Post:241

Points:1205
Posted by  Pushpendra Singh
 1497  View(s)
Ratings:
Rate this:
  1. Pushpendra Singh

    Post:241

    Points:1205
    What are the Session State Modes? Define each Session State mode supported by ASP.NET.

    ASP.NET supports three Session State modes.

    • InProc
    • State Server
    • SQL Server

    InProc Mode
    This mode stores the session data in the ASP.NET worker process.
    This is the fastest among all of the storage modes.
    This mode effects performance if the amount of data to be stored is large.
    If ASP.NET worker process recycles or application domain restarts, the session state will be lost.

    State Server mode
    In this mode, the session state is serialized and stored in memory in a separate process.
    State Server can be maintained on a different system.
    State Server mode involves overhead since it requires serialization and de-serialization of objects.
    State Server mode is slower than InProc mode as this stores data in an external process.

    SQL Server Mode
    In this storage mode, the Session data is serialized and stored in a database table in the SQL Server database.
    This is reliable and secures storage of a session state.
    This mode can be used in the web farms.
    It involves overhead in serialization and de-serialization of the objects.
    SQL Server is more secure than the InProc or the State server mode. 

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!