FormsAuthentication Roles without Membership
问题 I'm trying to use FormsAuthentication and it's working fine at the moment with user name and password. I need to add User Role to the Forms authentication Ticket and i'm not using ASP.NET Membership. if (rep.CheckUser(model.UserName, model.Password,out UserRole))//Check User { FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe); // Roles.AddUserToRole(model.UserName, UserRole);//This Requires Membership return Redirect(FormsAuthentication.DefaultUrl); } 回答1: