Last post Mar 10, 2011 06:49 PM by sirdneo
Mar 09, 2011 02:22 AM|cesark|LINK
When I test my asp.net website app in my win 2000 server in Administrator user mode, the session I start (Session("user_ses") = myclass) only lasts a few seconds. But if I do the same as a ‘common’ user the session
lasts 20 minutes, which is the time I set in web.config file:
<sessionState mode="InProc" cookieless="false" timeout="20" />
So, which is the reason the session lasts so little in Administrator user mode in windows 2000 server?
Mar 09, 2011 07:35 AM|sirdneo|LINK
There are different options to set session time out in your application. For Details see:-
How to set Session Timeout in ASP.Net
If you set timeout as mentioned in above article and still you are loosing session before time or loosing session randomly then it might be because of server restarts. For details see:-
Why .Net sessions are terminated/loss unexpectedly
Mar 10, 2011 04:05 AM|cesark|LINK
Thank you for your answer, I think the problem was related to causes you mention in your blog.
Now sessions in the enviorment mentioned works fine. Most probably the cause of session losts were some pages errors that were registered in server log file thanks to and error handling I implemented. Now, after solving these pages errors (kind errors: file
not found) the session object lasts as expected.
Mar 10, 2011 06:49 PM|sirdneo|LINK
If your problem is solved then kindly mark the post as answered. Or if you require further clerifications then please share.