ConfigurationSection.GetAllowDefinition 메서드
구성 섹션의 allowDefinition
특성을 검색합니다.
구문
ConfigurationSection.GetAllowDefinition AllowDefinition
ConfigurationSection.GetAllowDefinition(AllowDefinition);
매개 변수
이름 | 정의 |
---|---|
AllowDefinition |
string 메서드가 반환하는 allowDefinition 특성을 수신하는 변수입니다GetAllowDefinition . 가능한 특성 값은 설명 섹션의 뒷부분에 나열됩니다. |
반환 값
이 메서드는 값을 반환하지 않습니다.
설명
allowDefinition
특성은 지정된 구성 섹션에 대해 구성 계층 값이 설정될 수 있는 위치를 지정합니다. 이러한 특성은 ApplicationHost.config 파일의 섹션에 지정됩니다 <configSections>
.
GetAllowDefinition
는 정적 메서드이므로 다음 예제와 같이 클래스 개체를 가져오면 호출해야 합니다.
' Correct syntax:
Set oAnonAuth = oWebAdmin.Get("AnonymousAuthenticationSection")
oAnonAuth.GetAllowDefinition strAnonAuthAllowDefinition
클래스의 구체적인 instance 호출 GetAllowDefinition
하려고 하므로 다음 구문이 Site
실패합니다. 메서드를 호출하면 "SWbemObjectEx: 찾을 수 없음" 오류가 발생합니다.
' Incorrect syntax:
Set oSite = oWebAdmin.Get("Site.Name='Default Web Site'")
oSite.GetSection "AnonymousAuthenticationSection", oAnonAuth
oAnonAuth.GetAllowDefinition strAnonAuthAllowDefinition
다음 표에서는 특성에 대한 가능한 값을 나열합니다 allowDefinition
.
키워드 | Description |
---|---|
Everywhere |
섹션은 계층의 아무 곳에나 설정할 수 있습니다. |
MachineOnly |
섹션은 Machine.config 파일에서만 설정할 수 있습니다. 참고: Machine.config 파일의 기본 위치는 %systemroot% Microsoft.NET\Framework\<version>\config\입니다. |
MachineToWebRoot |
섹션은 Machine.config 파일 또는 루트 Web.config 파일에서만 설정할 수 있습니다. 참고: 루트 Web.config 파일의 기본 위치는 %systemroot% Microsoft.NET\Framework\<version>\config\입니다. |
AppHostOnly |
섹션은 ApplicationHost.config 파일에서만 설정할 수 있습니다. |
MachineToApplication |
섹션은 전역 수준에서만 설정할 수 있습니다. .NET Framework 섹션의 경우 전역 수준은 루트 Web.config 또는 Machine.config 파일입니다. IIS 섹션의 경우 ApplicationHost.config 파일이며 애플리케이션의 경우 루트 애플리케이션에 대한 Web.config 파일입니다. |
예제
다음 예제에서는 allowDefinition
익명 인증 구성 섹션에 대한 특성을 표시합니다.
' Get the WebAdministration namespace.
Set oWebAdmin = GetObject( _
"winmgmts:root\WebAdministration")
' Get the AnonymousAuthenticationSection.
Set oAnonAuth = oWebAdmin.Get( _
"AnonymousAuthenticationSection")
' Get the allowDefinition attribute.
oAnonAuth.GetAllowDefinition strAnonAuthAllowDefinition
' Display the allowDefinition attribute.
WScript.Echo _
"Anonymous Authentication Allow Definition: " & _
strAnonAuthAllowDefinition
요구 사항
형식 | Description |
---|---|
클라이언트 | - Windows Vista의 IIS 7.0 - Windows 7의 IIS 7.5 - Windows 8의 IIS 8.0 - WINDOWS 10 IIS 10.0 |
서버 | - Windows Server 2008의 IIS 7.0 - Windows Server 2008 R2의 IIS 7.5 - Windows Server 2012의 IIS 8.0 - Windows Server 2012 R2의 IIS 8.5 - WINDOWS SERVER 2016 IIS 10.0 |
제품 | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF 파일 | WebAdministration.mof |
참고 항목
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기