Export (0) Print
Expand All
Expand Minimize

CustomErrorsMode Enumeration

Specifies the values for the custom errors modality.

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)

public enum CustomErrorsMode
public enum CustomErrorsMode
public enum CustomErrorsMode

 Member nameDescription
OffDisables custom errors, allowing display of standard errors. 
OnEnables custom errors. If no DefaultRedirect is specified, standard errors are issued.  
RemoteOnlyEnables custom errors on remote clients only. Custom errors are shown only to remote clients and ASP.NET errors are shown to the local host. 

The CustomErrorsMode enumerates the values you can use when setting the Mode property. These values define whether custom errors are enabled, disabled, or shown only to remote clients.

The following code example shows how to set the Mode property.

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

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


Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft