Session Timeout In Asp.Net

    Session can use store just similar data for user Like Cookies.Sessions can be used easily in ASP.NET with the Session object.

   ASP.NET supports various Session State Modes depending on various storage options for session data. The following are the available Session State Modes in ASP.NET:

  1. InProc
  2. StateServer
  3. SQLServer
  4. Custom
  5. Off

The InProc Session State Mode is the default session mode but you can also set the Session State Mode and session timeout in the Web.Config file of you application as in the following code snippet. 

<configuration>
  <
system.web>    
    <
sessionState mode="InProc" timeout="40"></sessionState>
  </
system.web></configuration>

The preceding session timeout setting keeps the session alive for 40 minutes. If you don't define a timeout attribute in the SessionState then the default value is 20 minutes.

      Default Session Timeout Time  ------->20 minutes
      Maximum Session Timeout Time  ---->525600 minutes

Comments

Popular posts from this blog

Insecure cookie setting: missing Secure flag

Maximum Stored Procedure Function Trigger or View Nesting Level Exceeded (limit 32) in SQL Server

Display Line Chart Using Chart.js MVC C#