Click here to Skip to main content
16,019,043 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
The session should not expire unless the user clicks logout from the application interface. Right now the session automatically times out after [Information missing from OP's post]. What should be the session mode to achieve the above need?

Thanks in advance!

[OP's Original]session sd not get expire until user clicks logout.
right now it's expires after <sessionstate timeout="180">
what sd be the session mode to achive above need.

thx in advance
[/OP's Original]
Posted
Updated 13-Jun-12 4:55am
v3
Comments
Manfred Rudolf Bihy 13-Jun-12 6:25am    
1st There is no question to be seen here.
2nd What you wrote can hardly be interpreted without some further explanation.
3rd Do us all a favor and edit your question to add the nescessary details. Use the button Improve question.
Thanks for your attention!
Manfred Rudolf Bihy 13-Jun-12 10:52am    
OK I think I understand now what you are trying to achieve. I'll rephrase your question accordingly.

1 solution

Usually the timeout is after 20 minutes of inactivity so that the session times out automatically after there was no interaction whatsoever of the user with the website for that time interval (AJAX calls in the background do count as activity in this sense). You can configure this timeout on your server: sessionState Element (ASP.NET Settings Schema)[^].
The timeout can not be greater than 525,600 minutes which is around a year or so.
[Edit]
You should also consider using a SQL Server based StateServer[^] as the session-state mode. The worker processes are recycled from time to time and if you don't persist your session states the session's state information will be lost. So beware, you have been warned! :) If you want to now how to control the recycling of the worker processes, please read here for IIS 7.0[^] and read here for IIS 6.0[^].
[/Edit]

Regards,

Manfred
 
Share this answer
 
v3
Comments
harshada3 14-Jun-12 2:28am    
Thanks Manfred

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