RoleManagerSection.DefaultProvider Property

Definition

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

C#
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("defaultProvider", DefaultValue="AspNetSqlRoleProvider")]
[System.Configuration.StringValidator(MinLength=1)]
public string DefaultProvider { get; set; }

Property Value

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

Attributes

Examples

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.

C#
// Display DefaultProvider property.
Console.WriteLine("DefaultProvider: {0}",
  configSection.DefaultProvider);

Remarks

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.

Applies to

Proizvod Verzije
.NET Framework 2.0, 3.0, 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

See also