RoleManagerSection.DefaultProvider Property

 

Gets or sets the name of the default provider that is used to manage roles.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

<ConfigurationPropertyAttribute("defaultProvider", DefaultValue := "AspNetSqlRoleProvider")>
<TypeConverterAttribute(GetType(WhiteSpaceTrimStringConverter))>
<StringValidatorAttribute(MinLength := 1)>
Public Property DefaultProvider As String

Property Value

Type: System.String

The name of a provider in the Providers. The default is "AspNetSqlRoleProvider".

The DefaultProvider property must match a named value in the providers subsection of the roleManager section of a configuration file. An empty string ("") is not a valid value for the DefaultProvider property.

The following code example demonstrates how to use the CookieSlidingExpiration property. This code example is part of a larger example provided for the RoleManagerSection class.

' Display DefaultProvider property.
Console.WriteLine("DefaultProvider: {0}", _
 configSection.DefaultProvider)

.NET Framework
Available since 2.0
Return to top
Show: