I have a MVC 4 web application which I want to implement SqlRoleProvider
and Windows Authentication
into it.
After I did search in Google I added SqlRoleProvider
tables in my database by running aspnet_regsql
command in VS command prompt.
Then I added this to my web.config
:
<authentication mode="Windows" />
<roleManager enabled="true">
<providers>
<clear />
<add connectionStringName="PortalDbContext" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
<add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" />
</providers>
</roleManager>
Now I need to know how can I manage roles? I mean how to create/edit/delete roles and assign/un-assign users from roles?
Should I create these pages by myself or there is something already available may be with NuGet
?
I usually just roll my own. And this has been years, not sure if its supported anymore, but you can use the Asp.Net Web Site Administration Tool if your on IIS. It's slow and clunky but if I recall get's the job done.