WindowsTokenRoleProvider.ApplicationName 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 the name of the application.
public:
virtual property System::String ^ ApplicationName { System::String ^ get(); void set(System::String ^ value); };
public override string ApplicationName { get; set; }
member this.ApplicationName : string with get, set
Public Overrides Property ApplicationName As String
The name of the application.
An attempt was made to set the ApplicationName property by a caller that does not have High ASP.NET hosting permission.
An attempt was made to set the ApplicationName to a string that is longer than 256 characters.
The following example shows the roleManager
element in the system.web
section of the Web.config file for an ASP.NET application. It specifies the application's WindowsTokenRoleProvider instance and sets the ApplicationName property to MyApplication
.
<roleManager defaultProvider="WindowsProvider"
enabled="true"
cacheRolesInCookie="false">
<providers>
<add
name="WindowsProvider"
type="System.Web.Security.WindowsTokenRoleProvider"
applicationName="MyApplication" />
</providers>
</roleManager>
Unlike other role providers such as the SqlRoleProvider, the WindowsTokenRoleProvider class does not associate role information with an application. Instead, the role information is taken from the Windows groups on the local computer. Multiple applications on the same server that use the WindowsTokenRoleProvider class always share the same role information. Although the applicationName
can be configured in the Web.config file for the application, the ApplicationName property is not used to retrieve role information.
Tuote | Versiot |
---|---|
.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 |
Tuotteen .NET palaute
.NET on avoin lähdekoodi projekti. Anna palautetta valitsemalla linkki: