Networking System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.x.x 1.0.5000.0 2.0.0.0 System.Enum

Contains the values of status codes defined for the Hypertext Transfer Protocol (HTTP).

This enumeration is used by .

The enumeration contains the values of the status codes defined in IETF RFC 2616 - HTTP/1.1.

The status of an HTTP request is contained in the property.

The following example compares the status returned by a with a value to determine the status of the response.

`using System; using System.Net; public class HttpStatusCodeExample { public static void Main() { string serverName = "http://www.contoso.com"; HttpWebRequest httpReq = (HttpWebRequest) WebRequest.Create(serverName); httpReq.AllowAutoRedirect = false; HttpWebResponse httpRes = (HttpWebResponse) httpReq.GetResponse(); if (httpRes.StatusCode==HttpStatusCode.Found) { Console.WriteLine("Request for {0} was redirected.", serverName); } } }`

The output is

Request for http://www.contoso.com was redirected.

- Field
  System.Net.HttpStatusCode Accepted

  Equivalent to HTTP status 202. Indicates that the request has been accepted but not yet processed.

  For a detailed description of the HTTP status code 202, see Section 10.2.3 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Ambiguous

  Equivalent to HTTP status 300. Indicates that multiple representations, each with a specific location, correspond to the requested resource. Agent-driven negotiation information is provided so that the request can be redirected by the user (or user agent) to the location of the preferred representation.

  The default action is to treat this status as a redirect and follow the contents of the Location header associated with the current response.

  is a synonym for .

  For a detailed description of the HTTP status code 300, see Section 10.3.1 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode BadGateway

  Equivalent to HTTP status 502. Indicates that the server, acting as a gateway or proxy, received an invalid response from the upstream server that was accessed while attempting to fulfill the request.

  For a detailed description of the HTTP status code 502, see Section 10.5.3 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode BadRequest

  Equivalent to HTTP status 400. Indicates that improper syntax prevented the server from understanding the request .

  For a detailed description of the HTTP status code 400, see Section 10.4.1 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Conflict

  Equivalent to HTTP status 409. Indicates that a conflict with the current resource state prevented the completion of the request.

  For a detailed description of the HTTP status code 409, see Section 10.4.10 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Continue

  Equivalent to HTTP status 100. Indicates that the client is allowed to continue with the request.

  For a detailed description of HTTP status code 100, see Section 10.1.1 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Created

  Equivalent to HTTP status 201. Indicates that the request has been fulfilled, resulting in the creation of a new resource. The most specific URI for this resource is contained by the Location header field of the response.

  For a detailed description of the HTTP status code 201, see Section 10.2.2 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode ExpectationFailed

  Equivalent to HTTP status 417. Indicates that the Expect request-header field condition could not be met by the server, or the server is a proxy and has unambiguous evidence that the next-hop server cannot meet the condition.

  For a detailed description of the HTTP status code 417, see Section 10.4.18 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Forbidden

  Equivalent to HTTP status 403. Indicates that the server understood but refuses to fulfill the request.

  For a detailed description of the HTTP status code 403, see Section 10.4.4 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Found

  Equivalent to HTTP status 302. Indicates that the requested resource is temporarily located on a different URI.

  is a synonym for .

  The default action when this status is received is to follow the Location header of the response. When the original request method was POST, the redirected request will use the GET method.

  For a detailed description of the HTTP status code 302, see Section 10.3.3 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode GatewayTimeout

  Equivalent to HTTP status 504. Indicates that the server, acting as a gateway or proxy, timed out while waiting for a response from an upstream server accessed in an attempt to fulfill the request.

  For a detailed description of the HTTP status code 504, see Section 10.5.5 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Gone

  Equivalent to HTTP status 410. Indicates both that the requested resource is no longer available on the server and no forwarding address is known.

  For a detailed description of the HTTP status code 410, see Section 10.4.11 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode HttpVersionNotSupported

  Equivalent to HTTP status 505. Indicates that the HTTP protocol version used by the request is not supported by the server.

  For a detailed description of the HTTP status code 505, see Section 10.5.6 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode InternalServerError

  Equivalent to HTTP status 500. Indicates that the request could not be fulfilled by the server due to an unexpected condition.

  For a detailed description of the HTTP status code 500, see Section 10.5.1 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode LengthRequired

  Equivalent to HTTP status 411. Indicates that the server refuses to accept the request because its Content-length header is undefined.

  For a detailed description of the HTTP status code 411, see Section 10.4.12 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode MethodNotAllowed

  Equivalent to HTTP status 405. Indicates that the method specified in the Request-Line is not allowed for the requested resource.

  For a detailed description of the HTTP status code 405, see Section 10.4.6 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode MovedPermanently

  Equivalent to HTTP status 301. Indicates that a new, permanent URI has been assigned to the requested resource. All future references should use one of the returned URIs.

  The default action when this status is received is to follow the Location header of the response. When the original request method was POST, the redirected request will use the GET method.

  is a synonym for .

  For a detailed description of the HTTP status code 301, see Section 10.3.2 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode MovedPermanently

  Equivalent to HTTP status 301. Indicates that a new, permanent URI has been assigned to the requested resource. All future references should use one of the returned URIs.

  The default action when this status is received is to follow the Location header of the response.

  is a synonym for .

  For a detailed description of the HTTP status code 301, see Section 10.3.2 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Ambiguous

  Equivalent to HTTP status 300. Indicates that multiple representations, each with a specific location, correspond to the requested resource. Agent-driven negotiation information is provided so that the request can be redirected by the user (or user agent) to the location of the preferred representation.

  The default action is to treat this status as a redirect and follow the contents of the Location header of the response.

  is a synonym for .

  For a detailed description of the HTTP status code 300, see Section 10.3.1 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode NoContent

  Equivalent to HTTP status 204. Indicates that the request has been fulfilled by the server and no entity-body was returned by the server.

  For a detailed description of the HTTP status code 204, see Section 10.2.5 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode NonAuthoritativeInformation

  Equivalent to HTTP status 203. Indicates that a local or a third-party copy rather than the origin server provided the metainformation returned in the entity-header.

  For a detailed description of the HTTP status code 203, see Section 10.2.4 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode NotAcceptable

  Equivalent to HTTP status 406. Indicates that the only response entities that can be generated by the requested resource have content characteristics that are not acceptable according to the accept headers sent in the request.

  For a detailed description of the HTTP status code 406, see Section 10.4.7 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode NotFound

  Equivalent to HTTP status 404. Indicates that the server did not find a resource that matches the requested URI.

  For a detailed description of the HTTP status code 404, see Section 10.4.5 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode NotImplemented

  Equivalent to HTTP status 501. Indicates that the functionality required to fulfill the request is not supported by the server. This is appropriate, for example, if the server does not recognize the request method and cannot support it for any resource.

  For a detailed description of the HTTP status code 501, see Section 10.5.2 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode NotModified

  Equivalent to HTTP status 304. Indicates that the client has performed a conditional GET request and access is allowed, but the document has not been modified.

  For a detailed description of the HTTP status code 304, see Section 10.3.5 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode OK

  Equivalent to HTTP status 200. Indicates that the request succeeded. The method used by the request determines the information returned with the response as described in the following table.

  Method
  Information returned
  GET
  The entity that corresponds to the requested resource.
  HEAD
  The entity-header fields that correspond to the requested resource. Does not return the message-body.
  POST
  An entity that contains or describes the result of the action.
  TRACE
  An entity that contains the request message received by the server.

  For a detailed description of the HTTP status code 200, see Section 10.2.1 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode PartialContent

  Equivalent to HTTP status 206. Indicates that the server has fulfilled a partial GET request for the resource. The request is required to have included a Range header field that indicates the desired range.

  For a detailed description of the HTTP status code 206, see Section 10.2.7 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode PaymentRequired

  Equivalent to HTTP status 402. is reserved for future use.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode PreconditionFailed

  Equivalent to HTTP status 412. Indicates that a precondition given in one or more of the request-header fields was tested on the server but evaluated to false.

  Conditions are set with conditional request headers such as If-Match, If-None-Match, or If-Unmodified-Since.

  For a detailed description of the HTTP status code 412, see Section 10.4.13 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode ProxyAuthenticationRequired

  Equivalent to HTTP status 407. Indicates that the client is required to authenticate itself to the proxy before proceeding.

  The Proxy-authenticate header contains the details of how to perform the authentication.

  For a detailed description of the HTTP status code 407, see Section 10.4.8 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Found

  Equivalent to HTTP status 302. Indicates that the requested resource is temporarily located on a different URI.

  The default action when this status is received is to follow the Location header of the response. When the original request method was POST, the redirected request will use the GET method.

  is a synonym for .

  For a detailed description of the HTTP status code 302, see Section 10.3.3 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode TemporaryRedirect

  Equivalent to HTTP status 307. Indicates that the requested resource is temporarily located under a different URI.

  The default action when this status is received is to follow the Location header associated with the response. When the original request method was POST, the redirected request will also use the POST method.

  is a synonym for .

  For a detailed description of the HTTP status code 307, see Section 10.3.8 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode RedirectMethod

  Equivalent to HTTP status 303. Automatically redirects the client to the URI specified in the Location header as the result of a POST.

  The request to the resource specified by the Location header will be made with a GET.

  is a synonym for .

  For a detailed description of the HTTP status code 303, see Section 10.3.4 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode RequestedRangeNotSatisfiable

  Equivalent to HTTP status 416. Indicates that none of the values specified by the Range request-header field overlap the current extent of the selected resource, and no If-Range request-header field was contained by the request.

  For a detailed description of the HTTP status code 416, see Section 10.4.17 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode RequestEntityTooLarge

  Equivalent to HTTP status 413. Indicates that the request entity is larger that the server is willing or able to process, so the server is not processing the request.

  For a detailed description of the HTTP status code 413, see Section 10.4.14 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode RequestTimeout

  Equivalent to HTTP status 408. Indicates that the server timed out before the client produced a request.

  For a detailed description of the HTTP status code 408, see Section 10.4.9 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode RequestUriTooLong

  Equivalent to HTTP status 414. Indicates that the Request-URI is longer than the server will interpret, so the server is not servicing the request.

  For a detailed description of the HTTP status code 414, see Section 10.4.15 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode ResetContent

  Equivalent to HTTP status 205. Indicates that the server has fulfilled the request and the document view that yielded the request is to be reset by the user agent.

  For a detailed description of the HTTP status code 205, see Section 10.2.6 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode RedirectMethod

  Equivalent to HTTP status 303. Automatically redirects the client to the URI specified in the Location header as the result of a POST.

  The request to the resource specified by the Location header will be made with a GET.

  is a synonym for .

  For a detailed description of the HTTP status code 303, see Section 10.3.4 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode ServiceUnavailable

  Equivalent to HTTP status 503. Indicates that a temporary overloading or maintenance of the server is preventing it from handling the request.

  For a detailed description of the HTTP status code 503, see Section 10.5.4 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode SwitchingProtocols

  Equivalent to HTTP status 101. Indicates that the server understands and will comply with the client's request to switch the protocol being used by the current connection to the protocols defined by the response's Upgrade header.

  For a detailed description of the HTTP status code 101, see Section 10.1.2 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode TemporaryRedirect

  Equivalent to HTTP status 307. Indicates that the requested resource is temporarily located under a different URI.

  The default action when this status is received is to follow the Location header associated with the response. When the original request method was POST, the redirected request will also use the POST method.

  is a synonym for .

  For a detailed description of the HTTP status code 307, see Section 10.3.8 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Unauthorized

  Equivalent to HTTP status 401. Indicates that user authentication is required for the request.

  The WWW-Authenticate header contains the details of how to perform the authentication.

  For a detailed description of the HTTP status code 401, see Section 10.4.2 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode UnsupportedMediaType

  Equivalent to HTTP status 415. Indicates that the format of the entity of the request is not supported by the requested resource, so the server did not service the request.

  For a detailed description of the HTTP status code 415, see Section 10.4.16 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode Unused

  Equivalent to HTTP status 306.

  This status code is not used in HTTP/1.1.

  For a detailed description of the HTTP status code 306, see Section 10.3.7 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
- Field
  System.Net.HttpStatusCode UseProxy

  Equivalent to HTTP status 305. Indicates that the requested resource is required to be accessed through the proxy identified in the Location header field.

  For a detailed description of the HTTP status code 305, see Section 10.3.6 of IETF RFC 2616 - HTTP/1.1.

  0
  1.0.5000.0
  2.0.0.0
0