Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose/meaning of the Version property on a FormsAuthenticationTicket?

What is the purpose/meaning of the Version property on a FormsAuthenticationTicket?

like image 926
JasonS Avatar asked Nov 07 '08 18:11

JasonS


People also ask

How does form authentication work?

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.

How do I change form authentication in Windows authentication?

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.

Which namespace allows us to Formauthentication?

The FormsAuthentication class in the System. Web. Security namespace provides assorted methods for logging in and logging out users via the forms authentication system.

What is form authentication in C#?

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.


2 Answers

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.

like image 193
mokaymakci Avatar answered Sep 23 '22 14:09

mokaymakci


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".

like image 32
Mark Brackett Avatar answered Sep 21 '22 14:09

Mark Brackett