In case someone has another problem, and it has been resolved, I would like to share my solution:
Problem: I have a website made in asp.net mvc3, the session lasts often, between a few seconds and up to 5 minutes. In web.config, I set the timeout to 2880 minutes, I also set sessionstate to stateerver. I also delete timeouts for default use, still the problem:
<sessionState mode="StateServer"></sessionState> <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn"/> </authentication>
I made a sample web site that contains only login functions and interacting with databases to simulate an environment, then I got a more stable timeout of 2 minutes. 50 sec (checked 9 times), which is still not correct, since I set 2880 minutes in the web.config file.
Inside the code, when a user logs in, I create an AuthenticateTicket and save it in cookies, and then on the secure pages that I checked for User.Identity and the controllers have a [Authorize] filter, so when the session ends, I go to the input page.
On the same hosting server, I have other old applications that use .NET 3.5 web forms, and the session is fine for them, only for new mvc3 and mvc3 the session often expires. Thanks for any help you can give.
source share