private void SetLoginSession(User user) { var session = new UserSession(user.Id, user.UserName); UserSession.SetSession(session); int userid = UserSession.GetSession().UserId; FormsAuthentication.SetAuthCookie(user.UserName, false); }
public static void SetSession(UserSession session) { HttpContext.Current.Session[SessionName] = session; }