Share via


CustomErrorsSection.Mode プロパティ

定義

エラー表示モードを取得または設定します。

public:
 property System::Web::Configuration::CustomErrorsMode Mode { System::Web::Configuration::CustomErrorsMode get(); void set(System::Web::Configuration::CustomErrorsMode value); };
[System.Configuration.ConfigurationProperty("mode", DefaultValue=System.Web.Configuration.CustomErrorsMode.RemoteOnly)]
public System.Web.Configuration.CustomErrorsMode Mode { get; set; }
[<System.Configuration.ConfigurationProperty("mode", DefaultValue=System.Web.Configuration.CustomErrorsMode.RemoteOnly)>]
member this.Mode : System.Web.Configuration.CustomErrorsMode with get, set
Public Property Mode As CustomErrorsMode

プロパティ値

CustomErrorsMode 値のいずれか 1 つ。 既定値は、RemoteOnly です。

属性

次のコード例は、Mode プロパティの使用方法を示しています。

セクションを取得する方法については、クラス トピックの CustomErrorsSection コード例を参照してください。

// Get the current Mode.
CustomErrorsMode currentMode = 
    customErrorsSection.Mode;

// Set the current Mode.
customErrorsSection.Mode = 
    CustomErrorsMode.RemoteOnly;
' Get the current Mode.
  Dim currentMode _
  As CustomErrorsMode = customErrorsSection.Mode

' Set the current Mode.
  customErrorsSection.Mode = _
  CustomErrorsMode.RemoteOnly

注釈

カスタム エラーを有効にするか、無効にするか、リモート クライアントにのみ表示するかを指定します。

適用対象