CustomErrorsSection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
ASP.NET 사용자 지정 오류를 구성합니다. 이 클래스는 상속할 수 없습니다.
public ref class CustomErrorsSection sealed : System::Configuration::ConfigurationSection
public sealed class CustomErrorsSection : System.Configuration.ConfigurationSection
type CustomErrorsSection = class
inherit ConfigurationSection
Public NotInheritable Class CustomErrorsSection
Inherits ConfigurationSection
- 상속
예제
이 예제에서는 클래스의 멤버 로 액세스할 수도 있는 CustomErrorsSection 섹션의 여러 특성에 대해 선언적으로 값을 지정하는 방법을 보여 줍니다.
다음 구성 파일 예제에서는 섹션에 대해 선언적으로 값을 지정하는 방법을 보여 있습니다 customErrors .
<customErrors mode="RemoteOnly"
defaultRedirect="customerror.htm">
<error statusCode="404" redirect="customerror404.htm"/>
</customErrors>
다음 예제에서는 클래스를 사용하는 CustomErrorsSection 방법을 보여줍니다.
// Get the Web application configuration.
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
// Get the section.
CustomErrorsSection customErrorsSection =
(CustomErrorsSection)configuration.GetSection(
"system.web/customErrors");
// Get the collection
CustomErrorCollection customErrorsCollection =
customErrorsSection.Errors;
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the section.
Dim customErrorsSection _
As CustomErrorsSection = _
CType(configuration.GetSection( _
"system.web/customErrors"), _
CustomErrorsSection)
' Get the collection
Dim customErrorsCollection _
As CustomErrorCollection = customErrorsSection.Errors
설명
클래스는 CustomErrorsSection 프로그래밍 방식으로 액세스 하 고 구성 파일의 섹션을 customErrors 수정 하는 방법을 제공 합니다. 이 형식은 , CustomErrorCollection및 CustomErrorsMode 형식을 CustomError포함하는 그룹의 일부입니다.
메모
관련 섹션 속성인 CustomErrorsSection의 값이 AllowDefinition일 때, Everywhere는 구성 파일의 해당 섹션에서 정보를 읽고 쓸 수 있습니다.
생성자
| Name | Description |
|---|---|
| CustomErrorsSection() |
기본 설정을 사용하여 클래스의 새 인스턴스를 CustomErrorsSection 초기화합니다. |
속성
| Name | Description |
|---|---|
| AllowNestedErrors |
사용자 지정 오류 페이지를 표시할 수 없는 경우 ASP.NET 일반 오류 메시지를 표시해야 하는지 여부를 나타내는 값을 가져오거나 설정합니다. |
| CurrentConfiguration |
현재 Configuration 인스턴스가 속한 구성 계층 구조를 나타내는 최상위 ConfigurationElement 인스턴스에 대한 참조를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| DefaultRedirect |
리디렉션에 대한 기본 URL을 가져오거나 설정합니다. |
| ElementInformation |
사용자 지정할 수 없는 정보와 ElementInformation 개체의 기능이 포함된 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| ElementProperty |
ConfigurationElementProperty 개체 자체를 나타내는 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| Errors |
개체의 CustomError 컬렉션을 가져옵니다. |
| EvaluationContext |
ContextInformation 개체에 대한 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| HasContext |
CurrentConfiguration 속성이 |
| Item[ConfigurationProperty] |
이 구성 요소의 속성 또는 특성을 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
| Item[String] |
이 구성 요소의 속성, 특성 또는 자식 요소를 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
| LockAllAttributesExcept |
잠긴 특성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockAllElementsExcept |
잠긴 요소의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockAttributes |
잠긴 특성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockElements |
잠긴 요소의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockItem |
요소가 잠겨 있는지 여부를 나타내는 값을 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
| Mode |
오류 표시 형식을 가져오거나 설정합니다. |
| Properties |
속성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| RedirectMode |
사용자가 사용자 지정 오류 페이지로 리디렉션될 때 요청의 URL을 변경해야 하는지 여부를 나타내는 값을 가져오거나 설정합니다. |
| SectionInformation |
개체의 SectionInformation 사용자 지정할 수 없는 정보 및 기능을 포함하는 개체를 ConfigurationSection 가져옵니다. (다음에서 상속됨 ConfigurationSection) |