Support us .Net Basics C# SQL ASP.NET Aarvi MVC Slides C# Programs Subscribe Download

Inporc asp.net session state mode management - Part 64

Suggested Videos
Part 61 - How to Check if cookies are enabled or disabled
Part 62 - Asp.net session state
Part 63 - Cookie less sessions in asp.net

In this video, we will discuss about the asp.net session state mode - InProc. Asp.net session state mode can have any of the following 4 values. Asp.net session state mode is set in web.config file.
1. Off - Disables session state for the entire application.
2. InProc - Will be discussed in this session.

The following session state modes will be discussed in a later video session.
3. StateServer
4. SQLServer
5. Custom



InProc session state mode: When the session state mode is set to InProc, the session state variables are stored on the web server memory inside the asp.net worker process. This is the default session state mode.

Advantages of InProc session state mode:
1. Very easy to implement. All that is required is, to set, the session state mode=InProc in web.config file.
2. Will perform best because the session state memory is kept on the webserver, within the ASP.NET worker process(w3wp.exe).
3. Suitable for web applications hosted on a single server.
4. Objects can be added without serialization

Dis-advantages of InProc session state mode:
1. Session state data is lost, when the worker process or application pool is recycled.
2. Not suitable for web farms and web gardens.
3. Scalability could be an issue.



Note: 
Web Garden - Web application deployed on a server with multiple processors
Web Farm - Web application deployed on multiple server 



2 comments:

  1. Hi Venkat,

    Hope you will reply to this message.

    I am following your ASP videos, from part 64 - InProc session state mode.

    You are easily finding the "w3wp.exe" in the Task Manager.

    Unfortunately I couldn't find it practice, let me know where should I find it.

    I am using VS 2012, and OS is windows 8.1, IIS 8.5 version are installed.

    I struggled a lot and finally writing to you.

    Please help me.

    Regards
    Reddy
    Bangalore

    ReplyDelete
  2. Check the chekbox Show processes from all Users and Recheck.

    ReplyDelete

It would be great if you can help share these free resources