AuthenticationSection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
웹 애플리케이션에 대한 인증을 구성합니다. 이 클래스는 상속할 수 없습니다.
public ref class AuthenticationSection sealed : System::Configuration::ConfigurationSection
public sealed class AuthenticationSection : System.Configuration.ConfigurationSection
type AuthenticationSection = class
inherit ConfigurationSection
Public NotInheritable Class AuthenticationSection
Inherits ConfigurationSection
- 상속
예제
이 예제에서는 AuthenticationSection 클래스를 사용하는 방법을 보여 줍니다.
// Get the Web application configuration.
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
// Get the authentication section.
AuthenticationSection authenticationSection =
(AuthenticationSection)configuration.GetSection(
"system.web/authentication");
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the section.
Dim authenticationSection _
As AuthenticationSection = _
CType(configuration.GetSection( _
"system.web/authentication"), AuthenticationSection)
경고
credentials
섹션에 사용자 자격 증명을 저장하는 것은 안전하지 않은. 대신 Azure Key Vault사용합니다.
설명
AuthenticationSection 클래스는 구성 파일의 authentication
섹션에 프로그래밍 방식으로 액세스하고 수정하는 방법을 제공합니다.
메모
AuthenticationSection 값이 MachineToApplication섹션 속성 AllowDefinition 정의된 제한 사항에 따라 구성 파일의 관련 섹션에 정보를 쓸 수 있습니다. 계층 구조에서 허용되지 않는 수준에서 구성 파일에 쓰려고 하면 파서에서 오류 메시지가 생성됩니다. 그러나 이 클래스를 사용하여 계층 구조의 모든 수준에서 구성 정보를 읽을 수 있습니다. 보안 및 확장성을 위해 데이터베이스와 같은 외부 리포지토리를 사용하여 사용자의 자격 증명을 유지하는 것이 좋습니다.
생성자
AuthenticationSection() |
AuthenticationSection 클래스의 새 인스턴스를 초기화합니다. |