I am using the ASP.NET login control. I want to be able to set the timeout for Forms Authentication individually for each user (instead of globally in the web.config). From what I understand the only way to do this is to set the timeout on the AuthenticationTicket manually. Is there a way to do this when using the Login Control? It seems to me that the Login Control abstracts away all of this. I am hoping that there is some way to continue using the Login Control, but also have the ability to set the FormsAuthentication timeout individually for each user.
Thanks,
Corey
MSDN says:
So this event seems to be the right place to replace cookies. Firstly, the cookie need to be retrieved and decrypted:
right after this, the new authentication ticket based on just extracted should be created:
timeoutForUserhere is aTimeSpanvalue that holds the session timeout for the user.And finally, the old cookie in the response should be replaced with the new one:
This should do the trick.