C # HTTP response codes Chinese series 6 HttpWebResponse.StatusCode Comments

1xx - Information Tips These status codes indicate a provisional response. Before a client receiving a regular response, should be prepared to receive one or more 1xx response

· 100 - Continue initial request has been accepted, the client should continue to send the rest of the request. (HTTP 1.1 new)
· 101 - Switching Protocols server converts the client request to comply with another protocol (HTTP 1.1 new)

 

2xx - success of this type of status code indicates that the server successfully accepted the client request

· 200 - the OK everything is normal, the response document for GET and POST requests followed. 

· 201 - Created server has created the document, Location head gives its URL.
· 202 - Accepted has accepted the request, but the process is not complete.
· 203 - Non-Authoritative Information Document has returned normally, but some of the response headers might be incorrect, because the use of a copy of the document,
           a non-authoritative information (HTTP 1.1 new).
· 204 - No Content No new document, the browser should continue to display the original document. If you regularly refresh the page, and new user documentation can be determined Servlet enough,
           this status code is very useful.
· 205 - Reset Content nothing new, but the browser should reset the content it displays. To force the browser to clear the form input content (HTTP 1.1 new).
· 206 - Partial Content client sends a GET request with a Range header (the request block), completed its server (HTTP 1.1 new).

 
3xx - Redirection The client browser must take more action to fulfill the request. For example, the browser may have to request a different page on the server or repeat the request through a proxy server

· 300 - Multiple Choices Requested document can be found at multiple locations, which are already listed in the document returned. If the server is to propose preference,
            should be indicated in the Location response header. 

· 301-- document Moved Permanently customer requests, the new URL given in the Location header in other places, the browser should automatically access the new URL.
· 302 - Found similar to 301, but the new URL should be viewed as a temporary alternative, but not permanent. Note that the status information corresponding to the HTTP1.0 is "Moved Temporatily". When the status code is displayed, the browser can automatically access the new URL, so it is a very useful status code. Note that this status code 301 and sometimes can be used interchangeably. For example, if the browser request error http: // host / ~ user (missing following the slash), and some server returns 301, 302 and some is returned. Strictly speaking, we can only assume that only when the original request is GET browser will be automatically redirected. See 307.
· 303 - See Other similar 301/302, except that if the original request was POST, Location header specifies the target document should redirect extracted by GET (HTTP 1.1 new).
· 304-- buffer Documents Not Modified client and sends a request conditional (usually provided If-Modified-Since header only wants documents newer than represent a specified date).
           Server told clients that the original document buffer can continue to use.
· 305 - Use Proxy Requested document should proxy server specified in the Location header extraction (HTTP 1.1 new) by.
· 307 - Temporary Redirect and 302 (Found) the same. Many browsers will respond incorrectly 302 redirect response, even if the original request was POST, even if it is actually only a response in the POST request is redirected to 303. For this reason, HTTP 1.1 adds 307 to more clear distinction between several status code: 303 occurs when the transponder, the browser can follow redirected GET and POST requests; if the response is 307, the browser can only follow redirected GET request. (HTTP 1.1 new)

 
4xx - Client Error An error occurs, the client seems to have problems. For example, a client requests a page that does not exist, the client may not provide valid authentication information

· 400 - Bad Request request syntax error. 

· 401 - Unauthorized access is denied, the customer attempt to gain unauthorized access to password-protected page. The response will include a WWW-Authenticate header, whereby the browser displays the user name / password dialog box, and then issue the request again after filling in the appropriate Authorization header. IIS defines a number of different 401 errors that indicate a more specific cause of the error. These specific error code is displayed in the browser, but not in the IIS log:
· 401.1 - Logon failed.
* 401.2 - Logon failed due to server configuration.
* 401.3 - due to ACL on resource without authorization.
* 401.4 - Authorization failed.
· 401.5 - ISAPI / CGI application authorization failure.
* 401.7 - Access denied URL authorization policy on the Web server. This error code is specific to IIS 6.0.
· 403 - Forbidden resources are not available. Server understand the client's request, but refused to deal with it. Usually because of a file or directory permissions on the server settings lead.
            Forbidden: IIS defines a number of different 403 errors that indicate a more specific cause of the error:
* 403.1 - Execute access forbidden.
* 403.2 - Read access forbidden.
* 403.3 - Write access forbidden.
* 403.4 - requires SSL.
* 403.5 - requires SSL 128.
· 403.6 - IP address rejected.
* 403.7 - Client certificate required.
* 403.8 - Site access denied.
* 403.9 - Too many users.
* 403.10 - configuration is invalid.
* 403.11 - password change.
* 403.12 - Access Denied Map.
* 403.13 - Client certificate revoked.
* 403.14 - Directory Listing Denied.
* 403.15 - Client Access Licenses.
* 403.16 - Client certificate is untrusted or invalid.
* 403.17 - Client certificate has expired or is not yet valid.
* 403.18 - Can not execute requested in the current application pool URL. This error code is specific to IIS 6.0.
* 403.19 - Can not execute CGI for the client in this application pool side. This error code is specific to IIS 6.0.
· 403.20 - Passport logon failed. This error code is specific to IIS 6.0.
· 404 - Not Found can not find the resources specified location. It is also a common response.
* 404.0 - (None) - File or directory not found.
* 404.1 - Web site not accessible on the requested port.
· 404.2 - Web service extension lockdown policy prevents this request.
· 404.3 - MIME map policy prevents this request.
· 405 - Method Not Allowed request methods (GET, POST, HEAD, DELETE , PUT, TRACE , etc.) does not apply to the specified resource, HTTP verb used to access this page is
            not allowed (method not allowed.) (HTTP 1.1 new )
· 406 - Not Acceptable specified resource has been found, but it is not compatible with the MIME type and customer Accpet head as specified in the client browser does not accept the requested page
            MIME type (HTTP 1.1 new).
· 407 - Proxy Authentication Required requires proxy authentication, similar to 401, indicates that the client must be authorized to go through a proxy server. (HTTP 1.1 new)
· 408 - Request Timeout waiting time in the server license, the customer has not issued any request. Customers can request repeat the same after. (HTTP 1.1 new)
· 409 - Conflict and PUT requests are usually related. Given the current state of the request and resource conflicts, and therefore the request can not be successful. (HTTP 1.1 new)
· 410 - Gone The requested document is no longer available, and the server does not know where to redirect an address. And it is different in that 404, 407 represents a return to the document permanently left the
            designated position, and 404 represents a document for unknown reasons not available. (HTTP 1.1 new)
· 411 - the Length the Required server can not handle the request unless client sends a Content-Length header. (HTTP 1.1 new)
· 412 - Precondition Failed header specified number of prerequisites failure (HTTP 1.1 new) request.
· 413 - Request Entity Too Large size exceeds the size of the target document server is currently willing to deal. If the server thinks he can no longer handle the request later, it should provide a
            Retry-After header (HTTP 1.1 new).
· 414 - Request URI Too Long URI is too long (HTTP 1.1 new).
· 415 - Unsupported media type.
· 416 - Requested Range Not Satisfiable server can not meet customer specified in the request Range header. (HTTP 1.1 new) * 417-- failed.
· 423-- locked error.

 
5xx - Server Error The server encountered an error and could not complete due to the request

· 500 - Internal Server Error The server encountered an unexpected situation, can not complete the customer's request. 

· 500.12 - 应用程序正忙于在 Web 服务器上重新启动。
· 500.13 - Web 服务器太忙。
· 500.15 - 不允许直接请求 Global.asa。
· 500.16 – UNC 授权凭据不正确。这个错误代码为 IIS 6.0 所专用。
· 500.18 – URL 授权存储不能打开。这个错误代码为 IIS 6.0 所专用。
· 500.100 - 内部 ASP 错误。
· 501 - Not Implemented 服务器不支持实现请求所需要的功能,页眉值指定了未实现的配置。例如,客户发出了一个服务器不支持的PUT请求。
· 502 - Bad Gateway 服务器作为网关或者代理时,为了完成请求访问下一个服务器,但该服务器返回了非法的应答。 亦说Web 服务器用作网关
            或代理服务器时收到了无效响应。
· 502.1 - CGI 应用程序超时。
· 502.2 - CGI 应用程序出错。
· 503 - Service Unavailable 服务不可用,服务器由于维护或者负载过重未能应答。例如,Servlet可能在数据库连接池已满的情况下返回503。
           服务器返回503时可以提供一个 Retry-After头。这个错误代码为 IIS 6.0 所专用。
· 504 - Gateway Timeout 网关超时,由作为代理或网关的服务器使用,表示不能及时地从远程服务器获得应答。(HTTP 1.1新) 。
· 505 - HTTP Version Not Supported 服务器不支持请求中所指明的HTTP版本。(HTTP 1.1新)

 

Reprinted http://blog.csdn.net/cutbug/article/details/4024818

 

Guess you like

Origin www.cnblogs.com/SavionZhang/p/11394524.html