asp.net mvc 4 - SimpleRole / SimpleMember - add user to role -


mvc4 using simplemembership & role.

so after 18 hours of research, googling, trial & error, etc have simplemembership working. however, after multiple step-throughs , different scenarios, cant find new user assigned role. have roles in webpages_roles table.

so, 1 of 4000 built-in methods assigning , need add somewhere? or need manually?

you can add user role following code:

system.web.security.roles.adduserstorole("user1", "user2", "user3", ... , "yourrolename"); 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -