authentication 요소(ASP.NET 설정 스키마)

[이 설명서는 미리 보기 전용이며, 이후 릴리스에서 변경될 수 있습니다. 비어 있는 항목은 자리 표시자로 포함됩니다.]

ASP.NET 응용 프로그램을 보는 사용자를 식별하는 데 사용되는 ASP.NET 인증 체계를 구성합니다.

<authentication 
   mode="[Windows|Forms|Passport|None]"
> 
   <forms>...</forms>
   <passport/>
</authentication>

특성 및 요소

다음 단원에서는 특성, 자식 요소 및 부모 요소에 대해 설명합니다.

특성

특성

설명

mode

필수 특성입니다.

응용 프로그램의 기본 인증 모드를 지정합니다. 이 특성은 다음 값 중 하나일 수 있습니다.

값설명
Windows Windows 인증을 기본 인증 모드로 지정합니다.모든 형태의 Microsoft IIS(인터넷 정보 서비스) 인증(기본, 다이제스트, Windows 통합 인증(NTLM/Kerberos) 또는 인증서)을 사용할 때 이 모드를 사용합니다.이 경우에는 응용 프로그램에서 내부 IIS에 인증 책임을 위임합니다.
Forms ASP.NET 폼 기반 인증을 기본 인증 모드로 지정합니다.
Passport Microsoft Passport 네트워크 인증을 기본 인증 모드로 지정합니다.
None 인증을 지정하지 않고익명 사용자만 응용 프로그램에 액세스할 수 있거나 응용 프로그램에서 자체 인증을 제공합니다.

기본값은 Windows입니다.

자식 요소

요소

설명

forms

사용자 지정 폼 기반 인증을 위해 ASP.NET 응용 프로그램을 구성합니다.

passport

페이지에 인증이 필요하고 사용자가 Microsoft Passport 네트워크 인증으로 로그온하지 않은 경우 해당 페이지를 리디렉션하도록 지정합니다.

부모 요소

요소

설명

configuration

공용 언어 런타임 및 .NET Framework 응용 프로그램에서 사용하는 모든 구성 파일의 필수 루트 요소를 지정합니다.

system.web

구성 파일에서 ASP.NET 구성 설정에 대한 루트 요소를 지정하며, ASP.NET 웹 응용 프로그램을 구성하고 응용 프로그램의 동작 방식을 제어하는 구성 요소를 포함합니다.

설명

authentication 요소는 ASP.NET 응용 프로그램에 대한 ASP.NET 인증 체계를 구성합니다. 인증 체계는 ASP.NET 응용 프로그램을 보려는 사용자를 식별하는 방법을 결정합니다. mode 특성은 인증 체계를 지정합니다. 사용할 수 있는 인증 체계에 대한 자세한 내용은 ASP.NET Authentication을 참조하십시오.

기본 구성

다음의 기본 authentication 요소는 Machine.config 파일 또는 루트 Web.config 파일에 명시적으로 구성되어 있지 않습니다. 그러나 이 요소는 .NET Framework 버전 2.0의 응용 프로그램에서 반환하는 기본 구성입니다.

<authentication mode="Windows">
   <forms 
      name=".ASPXAUTH" 
      loginUrl="login.aspx" 
      defaultUrl="default.aspx" 
      protection="All" 
      timeout="30" 
      path="/" 
      requireSSL="false" 
      slidingExpiration="true" 
      cookieless="UseDeviceProfile" domain="" 
      enableCrossAppRedirects="false">
      <credentials passwordFormat="SHA1" />
   </forms>
   <passport redirectUrl="internal" />
</authentication>

다음의 기본 authentication 요소는 .NET Framework 버전 1.1의 Machine.config 파일에 구성되어 있습니다.

<authentication mode="Windows">
   <forms 
      name=".ASPXAUTH" 
      loginUrl="login.aspx" 
      protection="All"  
      timeout="30" 
      path="/" 
      requireSSL="false" 
      slidingExpiration="true">
      <credentials passwordFormat="SHA1"></credentials>
   </forms>
   <passport redirectUrl="internal" />
</authentication>

다음의 기본 authentication 요소는 .NET Framework 버전 1.0의 Machine.config 파일에 구성되어 있습니다.

<authentication mode="Windows">
   <forms 
      name=".ASPXAUTH" 
      loginUrl="login.aspx" 
      protection="All"  
      timeout="30" 
      path="/" >
      <credentials passwordFormat="SHA1"></credentials>
   </forms>
   <passport redirectUrl="internal" />
</authentication>

예제

다음 코드 예제에서는 폼 기반 인증을 위해 사이트를 구성하고, 클라이언트에서 로그온 정보를 전송하는 쿠키의 이름을 지정하고, 초기 인증이 실패할 경우에 사용할 로그온 페이지의 이름을 지정하는 방법을 보여 줍니다. 모든 사용자가 폼 인증을 거치게 하고 익명 사용자의 사이트 액세스를 거부하려면 authorization 섹션을 포함시켜야 합니다.

<configuration>
   <system.web>
      <authentication mode="Forms">
         <forms name="401kApp" loginUrl="/login.aspx"/>
      </authentication>
      <authorization>
         <deny users="?"/>
      </authorization>
   </system.web>
</configuration>

요소 정보

구성 섹션 처리기

AuthenticationSection

구성 멤버

AuthenticationMode

구성 가능한 위치

Machine.config

루트 수준의 Web.config

응용 프로그램 수준의 Web.config

요구 사항

Microsoft IIS(인터넷 정보 서비스) 버전 5.0, 5.1 또는 6.0

.NET Framework 버전 1.0, 1.1 또는 2.0

Microsoft Visual Studio 2003 또는 Visual Studio 2005

참고 항목

작업

How to: Configure Specific Folders Using Location Settings

How to: Lock ASP.NET Configuration Settings

참조

system.web 요소(ASP.NET 설정 스키마)

authentication 요소에 대한 forms 요소(ASP.NET 설정 스키마)

authentication 요소에 대한 passport 요소(ASP.NET 설정 스키마)

configuration 요소(일반 설정 스키마)

System.Configuration

System.Web.Configuration

AuthenticationSection

개념

ASP.NET Configuration File Hierarchy

Securing Configuration

Configuration Inheritance

기타 리소스

ASP.NET Authentication

일반 구성 설정(ASP.NET)

ASP.NET 구성 설정

Configuring ASP.NET Applications

ASP.NET Configuration Files

ASP.NET Configuration API