Pergunta

As I was going through creating my authentication mechanism in an application when I stumbled upon the FormsAuthenticationTicket.Version property. The docs do not exemplify any use case and I found no reference for it's use anywhere else.

Did anyone use it already?

Thanks

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top