So I have a timer that makes an async post back every 15 minutes. I have the webconfig set up to timeout after 60 minutes. But will it still time out? From what I can tell it won’t, is there a way to make it still time out?
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.
Forcing an asynchronous call will keep your asp.net session alive as long as the page with the timer is left open.
However, you need to think if this is what you want the desired behaviour to be. For example, if your user has had to login to their session do you want the session to stay alive, if for example, they have walked away from their computer for their lunch break?
You also don’t need to set your web.config to 60 minutes. If using this technique every 15 minutes the standard 20 minutes timeout will be more than adequate.
An alternative solution would be to pop up a message to the user asking if they wish to stay logged in. If they respond yes, do the postback.
To get it to still timeout, stop the automatic postback after the 3rd go (15*3=45 + 20m standard = 65 minutes)