locked
Forms Authentication Ticket Version Number in .Net 4.0/4.5 RRS feed

  • Question

  • User-1497865751 posted

    What is the significance of the Version Property of the FormsAuthenticationTicket class? In most of the web tutorials I have seen that the version property is set to 1 but msdn states that the default value is 2.

    What is the technical difference between Version 1 and Version 2 and which is the preferred version from a security perspective?

    Thanks
    Vishnu.Y

    Wednesday, May 28, 2014 10:45 AM

Answers

  • User-484054684 posted

    Hi Vishnu,

    From a forum discussion: Referring to: http://stackoverflow.com/a/13129756

    This was created for future use, so it can transpose tickets of a previous version to the current. In .NET 1.1, the default value is 1. Starting with .NET 2.0, the default value is 2. Unless, of course, you override this value when constructing a ticket manually.

    The framework doesn't really do anything with this value currently. You could use it yourself (and specify your own "version") to understand the data contained in a ticket as your application evolves and deals with persistent cookies, but mostly, you'll probably just ignore it.

    Hope this helps.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 28, 2014 11:06 AM