How to set session timeout in web.config
If you want to set the timeout to 20 minutes, use something like this:
<configuration>
<system.web>
<sessionState timeout="20"></sessionState>
</system.web>
</configuration>
How can I set infinity session time out in asp.net project
You can set session timeout
in web.config
as shown below. The value is showing minutes, so you can set as long as you want, up until a year.
<configuration>
<system.web>
<sessionState timeout="200"></sessionState>
</system.web>
</configuration>
The Timeout property can be set in the Web.config file for an
application using the timeout attribute of the sessionState
configuration element, or you can set the Timeout property value
directly using application code.The Timeout property cannot be set to a value greater than 525,600
minutes (1 year). The default value is 20 minutes.
Related Topics
What Is the Memory Overhead of a .Net Object
How to Ignore Unknown Enum Values During JSON Deserialization
Fast Converting Bitmap to Bitmapsource Wpf
Capture a Keyboard Keypress in the Background
How to "Steal" an Event Handler from One Control and Give It to Another
How Do Arrays in C# Partially Implement Ilist<T>
Win32 API Function to Programmatically Enable/Disable Device
Formatting a Float to 2 Decimal Places
Cannot Use Ref or Out Parameter in Lambda Expressions
How to Get .Net Core Projects to Copy Nuget References to the Build Output
Using Stringwriter for Xml Serialization
Allowing Untrusted Ssl Certificates with Httpclient
What Does the '=>' Syntax in C# Mean
Adding Placeholder Text to Textbox
How to Get Current User in ASP.NET Core
Add Data Annotations to a Class Generated by Entity Framework