I am trying to implmement Simple Membership for my ASP.NET WebSite (WebForm) using Framework 4.5
I came across this article
http://www.asp.net/web-pages/tutorials/security/16-adding-security-and-membership
I was wondering how can I add users to roles and add roles programatically?
At the moment I am using this code to register a user, but dont' have any snippets to create roles and add users to a particular role
var userStore = new UserStore<IdentityUser>();
var manager = new UserManager<IdentityUser>(userStore);
var user = new IdentityUser() { UserName = UserName.Text };
IdentityResult result = manager.Create(user, Password.Text);
if (result.Succeeded)
{
var authenticationManager = HttpContext.Current.GetOwinContext().Authentica ...
Go to the complete details ...