Oh the wonderful MVC world....
I am trying to setup a timeout script for my website. Currently it seems to work but if the user wanted to extend the timeout time then move to another page it seems to have lost all of my session varibles I had saved.
I am using some jQuery in order to check for the timeout and present the user with a message box 10 seconds before it resets the session and sends them to a "sessions over" page.
_Layout.cshtml code:
If the user clicks the "stay awake" button then it sends an AJAX request to Home/sessionChk which sends a true for the continueSession.
HomeController.cs sessionChk code:
So after it adds 31 more mintues I go ahead and pick another page within the site to visit. Once that page starts loading it tells me a session varible I am trying to load is no longer there.....
During the 1 minute the session starts when the page loads for the first time I can surf to any page within the site and all the sessions are fine and load up with the correct data so I know they have data at the beginning.
So what am I doing incorrectly since it doesnt seem to safe the session data when I extend the timeout time?