HOW TO STORE ADDITIONAL USER INFORMATION IN FORMS AUTHENTICATION

When using Forms Authentication, it can be desirable to store additional information with the authentication cookie, like the user's first name, or whether or not they are an admin. Thankfully, while not super intuitive, Forms Authentication does provide this using the FormsAuthenticationTicket's UserData property.

The UserData property is a string, so you can store pipe-separated data, or even a serialized object.

[continue reading]

How to Store Additional User Information in Forms Authentication
12.07.2018 ~ 03:49 PM
posted in professional
tagged in c# : forms-authentication
comments [1]