Help with FormsAuthentication
Hi all :)
I would like to create a login screen which will authentication the user, store the user id and store a generated session ID.
I use FormsAuthentication.SetAuthCookie(USER_ID, False) and later on use id.Ticket.Name to retrieve USER_ID. That's fine and working.
However, how can I store (and retrieve) the session ID? I really need some help. Thanks a million.
Re: Help with FormsAuthentication
Well, you're obviously using SQLState correct? Because, if you're not, then you can obtain the SessionID from the Page.Session.SessionId.
Otherwise, I believe there is an overload for creating a formsAuthenticationcookie that has as the last parameter a string (or string array, can't remember which)... where you store (serialize) any number of values.