WindowsTokenRoleProvider 클래스

정의

Windows 그룹 멤버 자격에서 ASP.NET 애플리케이션에 대한 역할 정보를 가져옵니다.

public ref class WindowsTokenRoleProvider : System::Web::Security::RoleProvider
public class WindowsTokenRoleProvider : System.Web.Security.RoleProvider
type WindowsTokenRoleProvider = class
    inherit RoleProvider
Public Class WindowsTokenRoleProvider
Inherits RoleProvider
상속
WindowsTokenRoleProvider

예제

다음 예제에서는 ASP.NET 애플리케이션에 대한 Web.config 파일을 보여줍니다. 애플리케이션이 Windows 인증 및 WindowsTokenRoleProvider 클래스를 모두 사용하여 Windows 사용자에 대한 역할 정보를 검색하도록 지정합니다. 요소는 authorization BUILTIN\Administrators 그룹의 사용자만 애플리케이션에 액세스할 수 있도록 지정합니다.

<configuration>
  <system.web>
    <authentication mode="Windows" />

    <authorization>
      <allow roles="BUILTIN\Administrators" />
      <deny users="*" />
    </authorization>

    <roleManager defaultProvider="WindowsProvider"
      enabled="true"
      cacheRolesInCookie="false">
      <providers>
        <add
          name="WindowsProvider"
          type="System.Web.Security.WindowsTokenRoleProvider" />
      </providers>
    </roleManager>

  </system.web>
</configuration>

설명

WindowsTokenRoleProvider 클래스는 Windows 보안 그룹을 기반으로 Windows 사용자의 역할 정보를 검색하는 읽기 전용 역할 멤버 자격 공급자입니다. IIS 인증 설정이 익명 인증을 사용하지 않도록 설정하는 Windows 인증 모드를 사용하는 ASP.NET 애플리케이션에서 가장 유용합니다. 특정 Windows 그룹의 사용자 멤버 자격에 따라 액세스를 허용하거나 거부하도록 ASP.NET 애플리케이션을 구성할 수 있습니다.

WindowsTokenRoleProvider 클래스를 사용하여 역할을 만들거나 삭제하거나 Windows 그룹 멤버 자격을 기반으로 하는 역할의 멤버 자격을 수정할 수 없습니다. 이 기능은 Windows 운영 체제에서 관리됩니다. 이 클래스는 WindowsTokenRoleProvider 추상 클래스의 IsUserInRoleGetRolesForUser 메서드와 RoleProvider 메서드만 지원합니다.

생성자

Name Description
WindowsTokenRoleProvider()

WindowsTokenRoleProvider 클래스의 인스턴스를 만듭니다.

속성

Name Description
ApplicationName

애플리케이션의 이름을 가져오거나 설정합니다.

Description

관리 도구 또는 기타 UI(사용자 인터페이스)에 표시하기에 적합한 짧고 친숙한 설명을 가져옵니다.

(다음에서 상속됨 ProviderBase)
Name

구성 중에 공급자를 참조하는 데 사용되는 이름을 가져옵니다.

(다음에서 상속됨 ProviderBase)

메서드

Name Description
AddUsersToRoles(String[], String[])

이 메서드는 Windows 토큰 역할 공급자에서 지원되지 않습니다.

CreateRole(String)

이 메서드는 Windows 토큰 역할 공급자에서 지원되지 않습니다.

DeleteRole(String, Boolean)

이 메서드는 Windows 토큰 역할 공급자에서 지원되지 않습니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
FindUsersInRole(String, String)

이 메서드는 Windows 토큰 역할 공급자에서 지원되지 않습니다.

GetAllRoles()

이 메서드는 Windows 토큰 역할 공급자에서 지원되지 않습니다.

GetHashCode()

기본 해시 함수로 사용됩니다.

(다음에서 상속됨 Object)
GetRolesForUser(String)

사용자가 있는 Windows 그룹의 목록을 가져옵니다.

GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
GetUsersInRole(String)

이 메서드는 Windows 토큰 역할 공급자에서 지원되지 않습니다.

Initialize(String, NameValueCollection)

ASP.NET 애플리케이션의 구성 파일에 지정된 속성 값을 사용하여 Windows 토큰 역할 공급자를 초기화합니다. 이 메서드는 코드에서 직접 사용할 수 없습니다.

IsUserInRole(String, String)

지정된 사용자가 지정된 Windows 그룹에 있는지 여부를 나타내는 값을 가져옵니다.

IsUserInRole(String, WindowsBuiltInRole)

지정된 사용자가 지정된 기본 제공 Windows 역할에 있는지 여부를 나타내는 값을 가져옵니다.

MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
RemoveUsersFromRoles(String[], String[])

이 메서드는 Windows 토큰 역할 공급자에서 지원되지 않습니다.

RoleExists(String)

이 메서드는 Windows 토큰 역할 공급자에서 지원되지 않습니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보