.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Ava Aiden
Imran Ghani
Thomas Shaw

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

session modes

Posted By: sankar     Posted Date: September 02, 2008    Points:2   Category :ASP.Net
session has 3 modes.

1) inproc

2) stateserver

3) sql state

any one plz tell me in each mode where can the session data will store,and how we check/see the data in each mode...

examples helps me greate.

Author: Amit Mehra             
Posted Date: September 02, 2008     Points: 5   

Yes session has 3 modes

1) InProc - In-process mode session state values are stored in memory on the local Web server

2) StateServer - StateServer mode stores session state in a process, referred to as the ASP.NET state service, that is separate from the ASP.NET worker process or IIS application pool.

3)Sql Server- SQLServer mode stores session state in a SQL Server database. Using this mode ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm

You can see the value like this

string sessionID = Session.SessionID;


Please "Mark As Answer " if this post help you.
Author: sankar             
Posted Date: September 02, 2008     Points: 5   

Thank you very much Amit.

so through sessionId how can i know whether it is inproc or state server.

one more thing is how can i track the values in state srever.

Author: Amit Mehra             
Posted Date: September 02, 2008     Points: 5   

By default the session is stored in InProc unless it is defined in web.config file like this

sqlconnectionstring="data source=;user id=<user id>;password=<password>"

I recommand you to follow this link



Please "Mark As Answer " if this post help you.
Author: TotalDotNet             
Posted Date: August 16, 2010     Points: 5   


In case of InProc the Session data stored in worker process of same server (aspnet_wp)

In case of State Server the session data stored in separate State Server process (aspnet_state)

In case of SQL Server session data stored in SQL Server Database.

Note in all these three cases the session id stored in client machine either in cookies or in url.


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend