我有一个 MVC 4 Web 应用程序,我想实现SqlRoleProvider
并Windows Authentication
融入其中。
在 Google 中搜索后,我通过在 VS 命令提示符SqlRoleProvider
下运行命令在我的数据库中添加了表。aspnet_regsql
然后我将此添加到我的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>
现在我需要知道如何管理角色?我的意思是如何创建/编辑/删除角色以及从角色分配/取消分配用户?
我应该自己创建这些页面还是已经有一些可用的东西NuGet
?