Excuse the extremely newbie question…
Once I have verified the users login credentials, Where should I store the state for whether a user is logged in or not?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Once you have validated that your user is OK according to the backend, you can make ASP.NET set an authentication cookie for the user in the response by doing a
FormsAuthentication.SetAuthCookie(username, persistent).From then on, ASP.NET will decrypt that cookie in requests and extract the username from it, giving you access to it via
HttpContext.Current.User.To me, it sound like this is what you’re looking for.