RoleManagerSection Class

Defines configuration settings that are used to support the role management infrastructure of Web applications.

Syntax

class RoleManagerSection : ConfigurationSectionWithCollection  

Methods

The following table lists the methods exposed by the RoleManagerSection class.

Name Description
Add (Inherited from ConfigurationSectionWithCollection.)
Clear (Inherited from ConfigurationSectionWithCollection.)
Get (Inherited from ConfigurationSectionWithCollection.)
GetAllowDefinition (Inherited from ConfigurationSection.)
GetAllowLocation (Inherited from ConfigurationSection.)
Remove (Inherited from ConfigurationSectionWithCollection.)
RevertToParent (Inherited from ConfigurationSection.)
SetAllowDefinition (Inherited from ConfigurationSection.)
SetAllowLocation (Inherited from ConfigurationSection.)

Properties

The following table lists the properties exposed by the RoleManagerSection class.

Name Description
CacheRolesInCookie A read/write boolean value. true if the current user's roles are cached in a cookie; otherwise, false. The default is false.
CookieName A read/write string value that specifies the name of the cookie that is used to cache role names. The default is ".ASPXROLES".
CookiePath A read/write string value that specifies the virtual path of the cookie that is used to cache role names. The default is "/".
CookieProtection A read/write sint32 enumeration that specifies the cookie protection scheme. The possible values are listed later in the Remarks section.
CookieRequireSSL A read/write boolean value. true if the cookie that is used to cache role names requires a Secure Sockets Layer (SSL) connection in order to be returned to the server; otherwise, false. The default is false.
CookieSlidingExpiration A read/write boolean value. true if the cookie that is used to cache role names will be reset periodically; otherwise, false. The default is true.
CookieTimeout A read/write datetime value that specifies the amount of time, in minutes, before the cookie that is used to cache role names expires. The default is 30 minutes.
CreatePersistentCookie A read/write boolean value. true if role names are made cookie-persistent across browser sessions; otherwise, false. The default is false.

The CreatePersistentCookie property indicates whether the cookie that is used to cache role names should be a persistent cookie, which means that the cookie is available across browser sessions, or a session-based cookie, which means that the cookie is lost when the browser is closed. The default is false, which indicates that a session-based cookie is used to cache role names.
DefaultProvider A read/write string value that specifies the name of the default provider that is used to manage roles. The default is "AspNetSqlRoleProvider". This property must match a named value specified in the Providers property. An empty string ("") is not a valid value.
Domain A read/write string value that specifies the name of the domain that is associated with the cookie that is used to cache role names. The default is an empty string (""). If no value is specified, the Domain property returns null.
Enabled A read/write boolean value. true if the ASP.NET role management feature is enabled (that is, it can be accessed at run time); otherwise, false. The default is false.
Location (Inherited from ConfigurationSection.) A key property.
MaxCachedResults A read/write sint32 value that specifies the maximum number of roles that ASP.NET caches in the role cookie. The default is 25.
Path (Inherited from ConfigurationSection.) A key property.
Providers A ProvidersSettings value that specifies role management providers. Note: Role management providers are components that provide access to the types of roles for a site.
SectionInformation (Inherited from ConfigurationSection.)

Subclasses

This class contains no subclasses.

Remarks

The following table lists the possible values for the CookieProtection property. The default is 3 (All).

Value Keyword Description
0 None Specifies that the cookie information is not protected. Information in the cookie is stored in clear text and is not validated when the information is sent back to the server.
1 Validation Ensures that the information in the cookie has not been changed before the information is sent back to the server.
2 Encryption Encrypts the information in the cookie.
3 All Specifies that both the Validation and Encryption values are used to protect the information in the cookie.

Inheritance Hierarchy

ConfigurationSection

ConfigurationSectionWithCollection

RoleManagerSection

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
MOF file WebAdministration.mof

See Also

ConfigurationSectionWithCollection Class
NameTypeElement Class
ProvidersSettings Class
CIM_DATETIME