Is there a way to mark a Controller Action to not reset the Forms Authentication ticket sliding expiration? I want to poll the server every x seconds for new info using ajax but that will effectively prevent the user session from ever expiring.
views:
177answers:
1
+1
Q:
ASP.NET MVC + Forms Authentication + AJAX: Polling action without resetting auth ticket expiration
A:
The code that renews the ticket is baked inside the FormsAuthenticationModule class which is sealed and it is not possible to modify this behavior. This is done by the RenewTicketIfOld method. Anyway enabling slidingExpiration is considered a security vulnerability for your site.
Darin Dimitrov
2010-05-15 08:03:55