HTTP Errors <httpErrors>
HTTP Errors <httpErrors>
errorMode |
Optional enum attribute. Specifies whether HTTP errors are enabled. The errorMode attribute can be one of the following values; the default is DetailedLocalOnly .
|
existingResponse |
Optional enum attribute. Specifies what happens to an existing response when the HTTP status code is an error, i.e. response codes >= 400. The existingResponse attribute can be one of the following values; the default is Auto .
|
HttpErrorsSection Class
The following table lists the possible values for the ErrorMode
property. The default is 0 (DetailedLocalOnly
).
Value | Keyword | Description |
---|---|---|
0 | DetailedLocalOnly |
A detailed error response is generated only if the request comes from the local computer. If the request comes from an external address, the server generates a custom error response. Note: The value of the ExistingResponse property determines whether a detailed or custom error is generated. |
1 | Custom |
The error that the module or server generates is replaced by a custom page that you specify. This mode is useful in providing friendlier error messages to end users. Note: This setting turns off detailed errors, even for local requests. |
2 | Detailed |
A page with detailed information about the application error is displayed, and custom errors are not shown. This mode is useful for testing and debugging Web sites and applications. Note: It is a security risk to set ErrorMode to Detailed , because even remote clients will receive detailed error information that could lead to unwanted information disclosure. |
The following table lists the possible values for the ExistingResponse
property. The default is 0 (Auto
).
Value | Keyword | Description |
---|---|---|
0 | Auto |
The response depends on the first successful match of the following set of ordered conditions: 1. If the IHttpResponse::SetStatus method was called by using the fTrySkipCustomErrors flag, the existing response is passed through, and no detailed or custom error is shown.2. If the ErrorMode property is set to Custom , the response is replaced.3. If ErrorMode is set to Detailed and there is an existing response, the response is passed through.4. If ErrorMode is set to Detailed and there is no existing response, the response is replaced with a detailed error. |
1 | Replace |
The existing response is always replaced, regardless of how SetStatus was called. |
2 | PassThrough |
The existing response is always used. |
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2018-02-24 media type
2018-02-24 ActionFilterAttribute
2018-02-24 log4net写日志的时间附带时区信息
2018-02-24 JQuery常用的api[最好是系统地学习一下《锋利的JQuery》]
2018-02-24 soapui icon以及resource的理解
2017-02-24 Pascal Script