角色管理器功能尚未启用 [英] The Role Manager feature has not been enabled

查看:211
本文介绍了角色管理器功能尚未启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

得到了下面的<一个href=\"https://msdn.microsoft.com/en-us/library/system.configuration.provider.providerexception(v=vs.110).aspx\">ProviderException

角色管理器功能尚未启用。

The Role Manager feature has not been enabled.

到目前为止好。

是否有一个地方,可以调用以检查角色管理器已启用与否的方法?

Is there somewhere a method that can be called to check if the Role Manager has been enabled or not?

推荐答案

您可以通过从布尔属性读做:

You can do this by reading from the boolean property at:

System.Web.Security.Roles.Enabled

这是从直接阅读启用 roleManager 元素的属性 web.config中

This is a direct read from the enabled attribute of the roleManager element in the web.config:

<configuration>
    <system.web>
        <roleManager enabled="true" />
    </system.web>
</configuration>

这篇关于角色管理器功能尚未启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆