RoleManagerSection.DefaultProvider Property
Definition
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 the name of the default provider that is used to manage roles.
public:
property System::String ^ DefaultProvider { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("defaultProvider", DefaultValue="AspNetSqlRoleProvider")]
[System.Configuration.StringValidator(MinLength=1)]
public string DefaultProvider { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))>]
[<System.Configuration.ConfigurationProperty("defaultProvider", DefaultValue="AspNetSqlRoleProvider")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.DefaultProvider : string with get, set
Public Property DefaultProvider As String
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.
// Display DefaultProvider property.
Console.WriteLine("DefaultProvider: {0}",
configSection.DefaultProvider);
' 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
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應