Storing more information using FormsAuthentication.SetAuthCookie

前端 未结 5 558
旧巷少年郎
旧巷少年郎 2020-11-30 20:45

I am using aspx and c# for a setting a authentication cookie for a login.

FormsAuthentication.SetAuthCookie(UserName, True)

I want to stor

5条回答
  •  情深已故
    2020-11-30 21:11

    Yes it is smart to use "|" to put more info. If Microsoft have another overloaded method

    public static void SetAuthCookie(String userName, bool createPersistentCookie, string userData)`
    

    Then our life will be much easier, our code will be safer.

提交回复
热议问题