CustomErrorsSection.Mode Property
Definition
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.
Gets or sets the error display modality.
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
Property Value
One of the CustomErrorsMode values. The default is RemoteOnly.
- Attributes
Examples
The following code example shows how to use the Mode property.
Refer to the code example in the CustomErrorsSection class topic to learn how to get the section.
// 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
Remarks
Specifies whether custom errors are enabled, disabled, or shown only to remote clients.
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.