Last post Aug 05, 2017 12:34 PM by hostingaspnet
Aug 04, 2017 07:52 AM|alihusain_77|LINK
I want to keep the session duration to maximum possible. How to make it and set it in the web.config file?
Aug 04, 2017 07:57 AM|rahulmarathe|LINK
You can use timeout property of session state in web.config file as follows.
<sessionState mode="InProc" cookieless="false" timeout="80" />
Here as mentioned above timeout="80" will set your ideal time to 80 mins. The maximum value is
525,600 minutes (1 year).
Aug 04, 2017 07:57 AM|PatriceSc|LINK
You tried the timeout found at
https://msdn.microsoft.com/en-us/library/h6bb9cz9(v=vs.100).aspx ? Or do you mean you want to change this programmtically ?
Not sure what is the problem you are trying to solve but it might be best to avoid depending on long session ('for example being able to restore a value if the session terminated). You could also perhaps use the SQL Server session provider.
If you are trying to solve a problem it sometimes best to directly discuss the source issue which may give other ideas about how to solve it.
Aug 05, 2017 12:34 PM|HostingASPNet|LINK
You should also increase the app pool time out.