I want my asp.net mvc(C#) application to be with the session without expire.
The Session should be active forever the user opens the application.
Whats the best way to do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I know two possibilities. First, set the session timeout in web.config to very long time interval.
Second, set the timeout to moderate interval like 10 or 20 minutes and include the ajax call to some method on server that does nothing. And make that call every, say 3-5 minutes, like some sort of keep-alive call. The downside is that you should have this javascript on every page so it will be better to put in on the master page