Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what is the main difference between

sessionState mode="InProc" timeout="30"


and


sessionState mode="InProc" timeout="1000"
Posted
Comments
DGKumar 6-Aug-13 5:42am    
Thank u very much for reply
I understood but small query regarding session
suppose i will set session timeout as 5 mins then it will kill automatically after finishd 5 mins.
if i am using more actions for navigation from one view to another view in my application then , is that session will be expired?

timeout sets the amount of time, in minutes, allowed between requests before the session-state provider terminates the session.

After the allowed time, the session is officially dead, RIP.



If you need to know a little more about ASP.NET Session:
MSDN wrote:
ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. HTTP is a stateless protocol. This means that a Web server treats each HTTP request for a page as an independent request. The server retains no knowledge of variable values that were used during previous requests. ASP.NET session state identifies requests from the same browser during a limited time window as a session, and provides a way to persist variable values for the duration of that session. By default, ASP.NET session state is enabled for all ASP.NET applications.


Available session state modes and their meanings:

- InProc mode, which stores session state in memory on the Web server. This is the default.

- StateServer mode, which stores session state in a separate process called the ASP.NET state service. This 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.

- SQLServer mode stores session state in a SQL Server database. This 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.

- Custom mode, which enables you to specify a custom storage provider.

- Off mode, which disables session state.


Cheers,
Edo
 
Share this answer
 
v3
Comments
Nandakishore G N 6-Aug-13 6:29am    
Good Answer.+5..
Joezer BH 6-Aug-13 7:22am    
Thank you Nandakishorerao!
I think you need to refer to this article to make confusions clear.After reading that,you will be able to understand almost everything related to session.

Exploring Session in ASP.NET[^]

In your code posted in question,its the time in minutes the session will be alive.(30 or 1000)

Regards..:laugh:
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900