Brian,
What I've done in the past is simply store the ID and look up the user from
that (users should be cached, so no perf issue)
int userId = Convert.ToInt32(context.User.Identity.Name);
MyUserClass user = MyUserClass.GetUser(userId);
string email = user.Email;
the GetUser function looks something like:
public static User GetUser(int userId){
User user = (User)HttpRuntime.Cache[userId.ToString()]
if (user == null){
//get from DB and store in cache for next time.
}
return user;
}
Karl
"Brian Shannon" <bs******@lbrspec.com> wrote in message
news:uS**************@TK2MSFTNGP09.phx.gbl...
Using forms authentication I want to add several pieces of data to the
UserData property in the Forms Ticket.
I want to include roles, email, user ID.
From reading it seems like you add all that to a string and add it to the
UserData property.
If that is the case how do you access each individual piece such as email.
I am not completely up to date with using ASP.NET's cookies so bare with
me.
Thanks