What is the purpose/meaning of the Version property on a FormsAuthenticationTicket?
Form Authentication is a token-based system. When users log in, they receive a token with user information that is stored in an encrypted cookie. When a user requests an ASP.NET page via the browser, the ASP.NET verifies whether the form authentication token is available.
To verify/change that settings go to IE > Tools > Internet Options > Security TAB > Custom Level > Scroll it to the end and look for User Authentication options.
The FormsAuthentication class in the System. Web. Security namespace provides assorted methods for logging in and logging out users via the forms authentication system.
Forms authentication enables user and password validation for Web applications that do not require Windows authentication. With forms authentication, user information is stored in an external data source, such as a Membership database, or in the configuration file for an application.
Just storing the ticket version number, you can understand the structure of the ticket by this value. It stores 1 for asp.net 1.1 and 2 for asp.net 2.0. Maybe in the future Microsoft will add some extra fields to the ticket then the version number will be 3.0. This number can be used by another software to differentiate tickets.
The docs are less than enlightening on this one, though the default version number did change from 1 to 2 with ASP.NET 2.0.
Reflector didn't turn up any interesting uses of it either, other than keeping it alive on renews. My guess is that it's for "future use".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With