views:

177

answers:

1

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.

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