다음을 통해 공유


CustomErrorsSection.DefaultRedirect 속성

정의

리디렉션에 대한 기본 URL을 가져오거나 설정합니다.

public:
 property System::String ^ DefaultRedirect { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("defaultRedirect")]
public string DefaultRedirect { get; set; }
[<System.Configuration.ConfigurationProperty("defaultRedirect")>]
member this.DefaultRedirect : string with get, set
Public Property DefaultRedirect As String

속성 값

오류가 발생할 때 애플리케이션이 리디렉션되는 기본 URL입니다.

특성

예외

DefaultRedirect 속성은 null입니다. 기본값입니다.

예제

다음 코드 예제에서는 속성을 사용 하는 방법을 보여 있습니다 DefaultRedirect .

섹션을 가져오는 방법을 알아보려면 클래스 항목의 CustomErrorsSection 코드 예제를 참조하세요.

// Get the currentDefaultRedirect
string currentDefaultRedirect = 
    customErrorsSection.DefaultRedirect;
' Get the currentDefaultRedirect
  Dim currentDefaultRedirect As String = _
  customErrorsSection.DefaultRedirect

설명

DefaultRedirect 지정하지 않으면 표준 오류가 대신 표시됩니다. 오류 DefaultRedirect 사용자 지정 페이지가 없는 경우 활성화할 제네릭 오류 페이지를 지정합니다.

메모

URL은 절대 또는 상대 값일 수 있습니다. 상대 URL은 오류가 발생한 웹 페이지가 아니라 지정한 DefaultRedirectWeb.config 파일을 기준으로 합니다. 타일드(~)로 시작하는 상대 URL은 애플리케이션의 루트 경로를 기준으로 합니다.

적용 대상