Recently, I thought of including some job related information in my website
www.KaaShivInfoTech.com. After deploying my code, I faced a typical issue of application pool fill of the objects.
Due to some poor coding, I allowed the user to logged in with a username and password. Unfortunately, I didn't give proper access for signing out.
Guessing, the session of the user took 30 minutes expiration time (Standard session expiration time). Since, most of the users are accessing this site and closing it with proper signing out. The objects started accumulating. At present, I dont have any idea to implement sign out option.
So I thought putting some timeout options in the connection string and web.config file.
Thought of sharing the same to you all.
String connection = "Server=xxx; port=3309; DATABASE=xxx;UID=xxx;PASSWORD=xxxxxx#;timeout=5;";
|
In the connection string, I've added timeout option as 5 minutes. If the database is accessed for more than 5 minutes, the connection should be thrown out.
or else,
we can do some changes in web.config file under system.web section
<system.web> <sessionState timeout="5" cookieless="true" regenerateExpiredSessionId="true"> </sessionState> |
Cheers,
Venkatesan Prabu .J