http status code

本文详细介绍了IIS 7.0及IIS 7.5中各类HTTP状态码的具体含义,包括信息响应、成功、重定向、客户端错误及服务器错误等类别,并列举了每个类别下的具体状态码及其说明。

其实这信息网上到处都是, 但是为了我自己查找和使用的方便, 还是转载并列在这里吧.

 

1xx – Informational

================

These HTTP status codes indicate a provisional response. The client computer receives one or more 1 xx responses before the client computer receives a regular response.
IIS 7.0 uses the following informational HTTP status codes:
  • 100 - Continue.
  • 101 - Switching protocols.

 

2xx – Success

===============

These HTTP status codes indicate that the server successfully accepted the request.
IIS 7.0 uses the following success HTTP status codes:
  • 200 - OK. The client request has succeeded.
  • 201 - Created.
  • 202 - Accepted.
  • 203 - Nonauthoritative information.
  • 204 - No content.
  • 205 - Reset content.
  • 206 - Partial content.
 

3xx – Redirection

==============

These HTTP status codes indicate that the client browser must take more action to fulfill the request. For example, the client browser may have to request a different page on the server. Or, the client browser may have to repeat the request by using a proxy server.
IIS 7.0 uses the following redirection HTTP status codes:
  • 301 - Moved permanently.
  • 302 - Object moved.
  • 304 - Not modified.
  • 307 - Temporary redirect.
 

4xx - Client error

===============

These HTTP status codes indicate that an error occurred and that the client browser appears to be at fault. For example, the client browser may have requested a page that does not exist. Or, the client browser may not have provided valid authentication information.
IIS 7.0 uses the following client error HTTP status codes:
  • 400 - Bad request. The request could not be understood by the server due to malformed syntax. The client should not repeat the request without modifications.
    IIS 7.0 defines the following HTTP status codes that indicate a more specific cause of a 400 error:
    • 400.1 - Invalid Destination Header.
    • 400.2 - Invalid Depth Header.
    • 400.3 - Invalid If Header.
    • 400.4 - Invalid Overwrite Header.
    • 400.5 - Invalid Translate Header.
    • 400.6 - Invalid Request Body.
    • 400.7 - Invalid Content Length.
    • 400.8 - Invalid Timeout.
    • 400.9 - Invalid Lock Token.
  • 401 - Access denied.
    IIS 7.0 defines several HTTP status codes that indicate a more specific cause of a 401 error. The following specific HTTP status codes are displayed in the client browser but are not displayed in the IIS log:
    • 401.1 - Logon failed.
    • 401.2 - Logon failed due to server configuration.
    • 401.3 - Unauthorized due to ACL on resource.
    • 401.4 - Authorization failed by filter.
    • 401.5 - Authorization failed by ISAPI/CGI application.
  • 403 - Forbidden.
    IIS 7.0 defines the following HTTP status codes that indicate a more specific cause of a 403 error:
    • 403.1 - Execute access forbidden.
    • 403.2 - Read access forbidden.
    • 403.3 - Write access forbidden.
    • 403.4 - SSL required.
    • 403.5 - SSL 128 required.
    • 403.6 - IP address rejected.
    • 403.7 - Client certificate required.
    • 403.8 - Site access denied.
    • 403.9 - Forbidden: Too many clients are trying to connect to the Web server.
    • 403.10 - Forbidden: Web server is configured to deny Execute access.
    • 403.11 - Forbidden: Password has been changed.
    • 403.12 - Mapper denied access.
    • 403.13 - Client certificate revoked.
    • 403.14 - Directory listing denied.
    • 403.15 - Forbidden: Client access licenses have exceeded limits on the Web server.
    • 403.16 - Client certificate is untrusted or invalid.
    • 403.17 - Client certificate has expired or is not yet valid.
    • 403.18 - Cannot execute requested URL in the current application pool.
    • 403.19 - Cannot execute CGI applications for the client in this application pool.
    • 403.20 - Forbidden: Passport logon failed.
    • 403.21 - Forbidden: Source access denied.
    • 403.22 - Forbidden: Infinite depth is denied.
    • 403.502 - Forbidden: Too many requests from the same client IP; Dynamic IP Restriction limit reached.
  • 404 - Not found.
    IIS 7.0 defines the following HTTP status codes that indicate a more specific cause of a 404 error:
    • 404.0 - Not found.
    • 404.1 - Site Not Found.
    • 404.2 - ISAPI or CGI restriction.
    • 404.3 - MIME type restriction.
    • 404.4 - No handler configured.
    • 404.5 - Denied by request filtering configuration.
    • 404.6 - Verb denied.
    • 404.7 - File extension denied.
    • 404.8 - Hidden namespace.
    • 404.9 - File attribute hidden.
    • 404.10 - Request header too long.
    • 404.11 - Request contains double escape sequence.
    • 404.12 - Request contains high-bit characters.
    • 404.13 - Content length too large.
    • 404.14 - Request URL too long.
    • 404.15 - Query string too long.
    • 404.16 - DAV request sent to the static file handler.
    • 404.17 - Dynamic content mapped to the static file handler via a wildcard MIME mapping.
    • 404.18 - Querystring sequence denied.
    • 404.19 - Denied by filtering rule.
    • 404.20 - Too Many URL Segments
  • 405 - Method Not Allowed.
  • 406 - Client browser does not accept the MIME type of the requested page.
  • 408 - Request timed out.
  • 412 - Precondition failed.
 

5xx - Server error

================

These HTTP status codes indicate that the server cannot complete the request because the server encounters an error.
IIS 7.0 uses the following server error HTTP status codes:
  • 500 - Internal server error.
    IIS 7.0 defines the following HTTP status codes that indicate a more specific cause of a 500 error:
    • 500.0 - Module or ISAPI error occurred.
    • 500.11 - Application is shutting down on the Web server.
    • 500.12 - Application is busy restarting on the Web server.
    • 500.13 - Web server is too busy.
    • 500.15 - Direct requests for Global.asax are not allowed.
    • 500.19 - Configuration data is invalid.
    • 500.21 - Module not recognized.
    • 500.22 - An ASP.NET httpModules configuration does not apply in Managed Pipeline mode.
    • 500.23 - An ASP.NET httpHandlers configuration does not apply in Managed Pipeline mode.
    • 500.24 - An ASP.NET impersonation configuration does not apply in Managed Pipeline mode.
    • 500.50 - A rewrite error occurred during RQ_BEGIN_REQUEST notification handling. A configuration or inbound rule execution error occurred.

      Note Here is where the distributed rules configuration is read for both inbound and outbound rules.

    • 500.51 - A rewrite error occurred during GL_PRE_BEGIN_REQUEST notification handling. A global configuration or global rule execution error occurred.

      Note Here is where the global rules configuration is read.

    • 500.52 - A rewrite error occurred during RQ_SEND_RESPONSE notification handling. An outbound rule execution occurred.
    • 500.53 - A rewrite error occurred during RQ_RELEASE_REQUEST_STATE notification handling. An outbound rule execution error occurred. The rule is configured to be executed before the output user cache gets updated.
    • 500.100 - Internal ASP error.
  • 501 - Header values specify a configuration that is not implemented.
  • 502 - Web server received an invalid response while acting as a gateway or proxy.
    IIS 7.0 defines the following HTTP status codes that indicate a more specific cause of a 502 error:
    • 502.1 - CGI application timeout.
    • 502.2 - Bad gateway.
  • 503 - Service unavailable.
    IIS 7.0 defines the following HTTP status codes that indicate a more specific cause of a 503 error:
    • 503.0 - Application pool unavailable.
    • 503.2 - Concurrent request limit exceeded.

 

下面的KB里还有不同错误的状态可能的原因和修复的方式.

 

资料来源

======================

The HTTP status codes in IIS 7.0 and in IIS 7.5

http://support.microsoft.com/kb/943891

【电动汽车充电站有序充电调度的分散式优化】基于蒙特卡诺和拉格朗日的电动汽车优化调度(分时电价调度)(Matlab代码实现)内容概要:本文介绍了基于蒙特卡洛和拉格朗日方法的电动汽车充电站有序充电调度优化方案,重点在于采用分散式优化策略应对分时电价机制下的充电需求管理。通过构建数学模型,结合不确定性因素如用户充电行为和电网负荷波动,利用蒙特卡洛模拟生成大量场景,并运用拉格朗日松弛法对复杂问题进行分解求解,从而实现全局最优或近似最优的充电调度计划。该方法有效降低了电网峰值负荷压力,提升了充电站运营效率与经济效益,同时兼顾用户充电便利性。 适合人群:具备一定电力系统、优化算法和Matlab编程基础的高校研究生、科研人员及从事智能电网、电动汽车相关领域的工程技术人员。 使用场景及目标:①应用于电动汽车充电站的日常运营管理,优化充电负荷分布;②服务于城市智能交通系统规划,提升电网与交通系统的协同水平;③作为学术研究案例,用于验证分散式优化算法在复杂能源系统中的有效性。 阅读建议:建议读者结合Matlab代码实现部分,深入理解蒙特卡洛模拟与拉格朗日松弛法的具体实施步骤,重点关注场景生成、约束处理与迭代收敛过程,以便在实际项目中灵活应用与改进。
wkhtmltopdf ce.html output.pdfLoading page (1/2) Warning: Blocked access to file /usr/share/remarkable/media/highlightjs.default.min.css Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/未识别/E0AB34963F1FPNFW0706_1740045746604_4281494272.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/未识别/E05E36080G1FPQ3N0102_1750901910075_2823700716.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/未识别/E0AB34963F1FPNFW0569_1739880983686_3304443251.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/未识别/E04836080G1FPPQC1144_1750579259054_2452813871.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/未识别/E0A734963F1FPNFK1370_1740275295569_3665225174.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/少分/E0A734963F1FPNFK0492_1740185733688_543816353.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/少分/E0A734963F1FPNFK1096_1740616516418_246766233.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/少分/E0AC34963F1FPNGZ0991_1737162383220_3022446520.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/少分/E0A634635F1FPNF90897_1750206882406_2254228376.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/少分/E04236080G1FPPNK2061_1750929726477_1278595401.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/少分/E06936080G1FPQ7W0698_1750666432575_3361535253.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/少分/E05L36080G1FPQ5A1962_1750993358502_56213211.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/分类错误/E05T36080G1FPPWB0047_1749868927317_2915249529.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/分类错误/E03D36080G1FPPEW0171_1749952830839_4237369372.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/分类错误/E0AB34963F1FPNFW0654_1740284158643_2500741493.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/多分/E0AC34963F1FPNGZ0145_1740403419675_2969073058.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/多分/E0AC34963F1FPNGZ0416_1737166251826_3536604772.jpg Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/多分/E0A734963F1FPNFK1053_1740042571110_128121444.jpg Warning: Blocked access to file /usr/share/remarkable/media/highlight.min.js Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/多分/E0A534963F1FPNFJ0044_1739835514791_1026479677.jpg Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/多分/E0A734963F1FPNFK1245_1740707000665_2537930183.jpg Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Warning: Blocked access to file /home/chenchengzhang/PycharmProjects/PythonProject/yolo/new_7_28_FP/多分/E03636080G1FPPE10087_1750032382444_4154186674.jpg Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Error: Failed to load about:blank, with network status code 301 and http status code 0 - Protocol "about" is unknown Printing pages (2/2)
07-31
在使用 `wkhtmltopdf` 将 HTML 转换为 PDF 时,如果遇到资源访问被阻止和加载 `about:blank` 失败的问题,通常是由以下两个原因导致的: 1. **本地文件访问被限制**:从较新版本的 `wkhtmltopdf` 开始,默认情况下禁用了对本地文件的访问权限,这会导致 HTML 文件中引用的本地图片、CSS 或 JS 文件无法正常加载,从而出现类似 `Blocked access to file` 的警告信息[^2]。 解决方法是通过添加 `--enable-local-file-access` 参数来启用本地文件访问权限。例如,在命令行中使用以下命令进行转换: ```bash wkhtmltopdf --enable-local-file-access index.html output.pdf ``` 如果是通过 Python 的 `pdfkit` 库调用 `wkhtmltopdf`,则可以在选项中添加 `'enable-local-file-access': None`,如下所示: ```python import pdfkit options = { 'enable-local-file-access': None } pdfkit.from_file('index.html', 'output.pdf', options=options) ``` 2. **加载 `about:blank` 页面失败**:`Failed to load about:blank` 错误通常出现在 HTML 文件中引用了 `about:blank` 或者某些框架页面加载失败时。这个错误的原因是 `wkhtmltopdf` 不支持某些协议(如 `about:`),并且在某些版本中会尝试加载空白页面导致错误[^4]。 解决方法包括: - 确保 HTML 文件中没有显式引用 `about:blank` 或者不必要的框架标签。 - 如果错误不影响最终 PDF 的生成效果,可以在命令行中使用 `--no-stop-slow-scripts` 参数来忽略脚本执行超时问题,或者使用 `--quiet` 参数来抑制警告输出: ```bash wkhtmltopdf --enable-local-file-access --no-stop-slow-scripts --quiet index.html output.pdf ``` - 如果使用的是嵌入式框架或 iframe,建议将其内容内联到主 HTML 文件中,或者确保其指向的 URL 是有效的 HTTP 地址,而不是 `about:blank`。 此外,如果 HTML 文件中引用了本地路径的资源(如图片、CSS),应确保路径格式为绝对路径或完整的 `file://` 协议格式,以避免路径解析失败。例如: ```html <img src="file:///home/user/images/logo.png"> <link rel="stylesheet" href="file:///home/user/css/style.css"> ``` 这样可以提高 `wkhtmltopdf` 对本地资源的识别能力,减少加载失败的情况[^5]。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值