首页新闻找找看学习计划

FormsAuthenticationTicket这个类的第一个参数的作用是什么?

0
悬赏园豆:10 [已解决问题] 解决于 2013-10-28 11:08

FormsAuthenticationTicket这个类的第一个参数  票证的版本号  这个参数的作用是什么?求解答。

JRoger的主页 JRoger | 菜鸟二级 | 园豆:258
提问于:2013-10-28 10:51
< >
分享
最佳答案
1

参考 What's the use for FormsAuthenticationTicket.Version property? 的回答:

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.

收获园豆:10
dudu | 高人七级 |园豆:39227 | 2013-10-28 10:59

谢谢dudu。这下我明白了。

JRoger | 园豆:258 (菜鸟二级) | 2013-10-28 11:08
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册