I’m wondering if I’m going to store some data into the session is it going to be there while the user is authenticated (using formsauth) or might happen that the data will suddenly go null
Share
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.
It depends where you save the session, by default it is saved in Proc mode, which means inside of iis process of this application. Session may be null in this case in two scenarios. One timeout which you set in web.config file or while iis process has been recycled due to low memory or it’s own timeout. So i wouldn’t count in inProc mode for things you need to keep in session for some time, about 1 minute and more because you don’t know when application will be recycled. Try out-of-proc mode. Save session on the same machine not in same process as application.
Good luck