WindowsTokenRoleProvider.ApplicationName 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 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
Property Value
The name of the application.
Exceptions
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.
Examples
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>
Remarks
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.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기