Problem: I have written my own membership provider to store and validate user information. Further, I have a web page that allows a user to come and sign up with a username, password, and a whole host of other client-related data. When the user submits that data, I would like to have them logged in.
Solution: Since I'm using Forms authentication for the ASP.NET website, it appears that the following code-snippet does what I want:
if (Membership.ValidateUser(u.UserName, u.Password)) FormsAuthentication.SetAuthCookie(u.UserName, false);
Remember Me
a@href@title, b, i, u
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.