Click here to Skip to main content
15,877,915 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to Integrate multiuser login at a time concept in a website of asp.net c#
and how to prevent auto logout untill untill user click on logout button


Thanks
Posted

1 solution

Don't even try to keep a Session alive for 5 hours: each Session uses memory on the server, and extending the time past the default 20 minutes is not recommended - it can lead to severe performance issues.

Instead, store the userid info in a cookie, and give that an expiration date. Update the cookie when the user posts back, and they get their five hours without any performance overhead on the server side.
 
Share this answer
 

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