Pay attention to the structure of personalized forms-based authentication in web.config:
<forms name="name" loginUrl="URL" defaultUrl="URL" protection="[All|None|Encryption|Validation]" timeout="[MM]" path="path" requireSSL="[true|false]" slidingExpiration="[true|false]"> enableCrossAppRedirects="[true|false]" cookieless="[UseUri|UseCookies|AutoDetect|UseDeviceProfile]" domain="domain name" ticketCompatibilityMode="[Framework20|Framework40]"> <credentials>...</credentials> </forms>
As you can see, the timeout property works based on minutes, where you set it to 2 (for example, 2 minutes).
Typically, if you enabled slidingExpiration in web.config. You do not need to manually update the new cookie . For your scenario, I suggest you use a trace tool, for example. Violinist. When you refresh the page, you can check with Fiddler that the cookie expiration time is reset.
I found a good example in Weird Timeouts with a custom ASPNETFormsAuthentication that can do some kind of permission for you.
source share