CustomErrorsMode Enum
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the values for the custom errors modality.
public enum class CustomErrorsMode
public enum CustomErrorsMode
type CustomErrorsMode =
Public Enum CustomErrorsMode
- Inheritance
Name | Value | Description |
---|---|---|
RemoteOnly | 0 | Enables custom errors on remote clients only. Custom errors are shown only to remote clients and ASP.NET errors are shown to the local host. |
On | 1 | Enables custom errors. If no DefaultRedirect is specified, standard errors are issued. |
Off | 2 | Disables custom errors, allowing display of standard errors. |
The following code example shows how to set the Mode property.
// 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
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.
Product | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: