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에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET