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 ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา