CustomErrorsSection.Mode Własność
Definicja
Ważny
Niektóre informacje dotyczą produktów przedpremierowych, które mogą zostać znacznie zmodyfikowane przed premierą. Microsoft nie udziela żadnych gwarancji, ani wyraźnych, ani domniemanych, dotyczących informacji podanych tutaj.
Pobiera lub ustawia modalność wyświetlania błędu.
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
Wartość nieruchomości
Jedna z CustomErrorsMode wartości. Wartość domyślna to RemoteOnly.
- Atrybuty
Przykłady
W poniższym przykładzie kodu pokazano, jak używać Mode właściwości.
Zapoznaj się z przykładem kodu w temacie klasy, CustomErrorsSection aby dowiedzieć się, jak uzyskać sekcję.
// 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
Uwagi
Określa, czy błędy niestandardowe są włączone, wyłączone, czy wyświetlane tylko klientom zdalnym.