RoleServiceManager.LoadRoles Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether the list of roles for the currently logged-on user must be retrieved.
public:
property bool LoadRoles { bool get(); void set(bool value); };
public bool LoadRoles { get; set; }
member this.LoadRoles : bool with get, set
Public Property LoadRoles As Boolean
true
if the list of roles must be retrieved; otherwise, false
. The default is false
.
If the LoadRoles property is set to true
, the list of roles is retrieved by the RoleServiceManager class by using the Roles.GetRolesForUser method. The list is then serialized into the page markup.
Obs!
When LoadRoles is true
, all the roles that the current authenticated user belongs to are sent to the browser. Because users can potentially see the role information, this can be a security issue.
The LoadRoles property can be specified in the ScriptManager control or in an associated ScriptManagerProxy control. If LoadRoles is set to true
for a proxy instance, the list of roles is retrieved and added to the page. If LoadRoles is false
, the roles are not added to the page markup. In that case, you can use the GetRolesForUser method to store role information in memory in the browser.
Produkt | Versjoner |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET-tilbakemelding
.NET er et åpen kilde-prosjekt. Velg en kobling for å gi tilbakemelding: