A little background:
I have developed a web application in MVC3 that requires users to be logged in to access.
If the web page has been left for 5 minutes, a timer fires which makes a jQuery ajax call to the server, and returns a partial view which contains the logged in users email address, and a password textbox so that the user can re-enter their details before continuing to use the application.
I use Forms Authentication, with the cookie for it stored in the browser set to expire when the browser session closes (i.e. it does not have the Expires property set).
If I have the idle timer set to 10 seconds, or 1 minute, it works fine. If however I set it to 5 minutes, on the server the following is what I see:
HttpContext.Current.User.Identity.IsAuthenticated has value false HttpContext.Current.User.Identity.Name has value "empty"
So I cannot get to the currently logged in users details.
Any ideas?