Share via


CustomErrorsSection.Mode Propiedad

Definición

Obtiene o establece el modo de presentación de errores.

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

Valor de propiedad

Uno de los valores de CustomErrorsMode. De manera predeterminada, es RemoteOnly.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo utilizar la propiedad Mode.

Consulte el ejemplo de código del tema de clase CustomErrorsSection para obtener información sobre cómo obtener la sección .

// 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

Comentarios

Especifica si los errores personalizados están habilitados, deshabilitados o solo se muestran a los clientes remotos.

Se aplica a