Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
StatusCodes Class
Definition
- Namespace:
- Microsoft.AspNetCore.Http
- Assembly:
- Microsoft.AspNetCore.Http.Abstractions.dll
- Package:
- Microsoft.AspNetCore.Http.Abstractions v1.0.0
- Package:
- Microsoft.AspNetCore.Http.Abstractions v1.1.0
- Package:
- Microsoft.AspNetCore.App.Ref v10.0.0
- Package:
- Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.Http.Abstractions v2.0.0
- Package:
- Microsoft.AspNetCore.Http.Abstractions v2.1.0
- Package:
- Microsoft.AspNetCore.Http.Abstractions v2.2.0
- Package:
- Microsoft.AspNetCore.App.Ref v3.0.1
- Package:
- Microsoft.AspNetCore.App.Ref v3.1.10
- Package:
- Microsoft.AspNetCore.App.Ref v5.0.0
- Package:
- Microsoft.AspNetCore.App.Ref v6.0.36
- Package:
- Microsoft.AspNetCore.App.Ref v7.0.5
- Package:
- Microsoft.AspNetCore.App.Ref v8.0.19
- Package:
- Microsoft.AspNetCore.App.Ref v9.0.8
- Source:
- StatusCodes.cs
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.
A collection of constants for HTTP status codes.
public ref class StatusCodes abstract sealed
public static class StatusCodes
type StatusCodes = class
Public Class StatusCodes
- Inheritance
-
StatusCodes
Remarks
Descriptions for status codes are available from Microsoft.AspNetCore.WebUtilities.ReasonPhrases.GetReasonPhrase(Int32).
Fields
| Name | Description |
|---|---|
| Status100Continue |
HTTP status code 100. |
| Status101SwitchingProtocols |
HTTP status code 101. |
| Status102Processing |
HTTP status code 102. |
| Status200OK |
HTTP status code 200. |
| Status201Created |
HTTP status code 201. |
| Status202Accepted |
HTTP status code 202. |
| Status203NonAuthoritative |
HTTP status code 203. |
| Status204NoContent |
HTTP status code 204. |
| Status205ResetContent |
HTTP status code 205. |
| Status206PartialContent |
HTTP status code 206. |
| Status207MultiStatus |
HTTP status code 207. |
| Status208AlreadyReported |
HTTP status code 208. |
| Status226IMUsed |
HTTP status code 226. |
| Status300MultipleChoices |
HTTP status code 300. |
| Status301MovedPermanently |
HTTP status code 301. |
| Status302Found |
HTTP status code 302. |
| Status303SeeOther |
HTTP status code 303. |
| Status304NotModified |
HTTP status code 304. |
| Status305UseProxy |
HTTP status code 305. |
| Status306SwitchProxy |
HTTP status code 306. |
| Status307TemporaryRedirect |
HTTP status code 307. |
| Status308PermanentRedirect |
HTTP status code 308. |
| Status400BadRequest |
HTTP status code 400. |
| Status401Unauthorized |
HTTP status code 401. |
| Status402PaymentRequired |
HTTP status code 402. |
| Status403Forbidden |
HTTP status code 403. |
| Status404NotFound |
HTTP status code 404. |
| Status405MethodNotAllowed |
HTTP status code 405. |
| Status406NotAcceptable |
HTTP status code 406. |
| Status407ProxyAuthenticationRequired |
HTTP status code 407. |
| Status408RequestTimeout |
HTTP status code 408. |
| Status409Conflict |
HTTP status code 409. |
| Status410Gone |
HTTP status code 410. |
| Status411LengthRequired |
HTTP status code 411. |
| Status412PreconditionFailed |
HTTP status code 412. |
| Status413PayloadTooLarge |
HTTP status code 413. |
| Status413RequestEntityTooLarge |
HTTP status code 413. |
| Status414RequestUriTooLong |
HTTP status code 414. |
| Status414UriTooLong |
HTTP status code 414. |
| Status415UnsupportedMediaType |
HTTP status code 415. |
| Status416RangeNotSatisfiable |
HTTP status code 416. |
| Status416RequestedRangeNotSatisfiable |
HTTP status code 416. |
| Status417ExpectationFailed |
HTTP status code 417. |
| Status418ImATeapot |
HTTP status code 418. |
| Status419AuthenticationTimeout |
HTTP status code 419. |
| Status421MisdirectedRequest |
HTTP status code 421. |
| Status422UnprocessableEntity |
HTTP status code 422. |
| Status423Locked |
HTTP status code 423. |
| Status424FailedDependency |
HTTP status code 424. |
| Status426UpgradeRequired |
HTTP status code 426. |
| Status428PreconditionRequired |
HTTP status code 428. |
| Status429TooManyRequests |
HTTP status code 429. |
| Status431RequestHeaderFieldsTooLarge |
HTTP status code 431. |
| Status451UnavailableForLegalReasons |
HTTP status code 451. |
| Status499ClientClosedRequest |
HTTP status code 499. This is an unofficial status code originally defined by Nginx and is commonly used in logs when the client has disconnected. |
| Status500InternalServerError |
HTTP status code 500. |
| Status501NotImplemented |
HTTP status code 501. |
| Status502BadGateway |
HTTP status code 502. |
| Status503ServiceUnavailable |
HTTP status code 503. |
| Status504GatewayTimeout |
HTTP status code 504. |
| Status505HttpVersionNotsupported |
HTTP status code 505. |
| Status506VariantAlsoNegotiates |
HTTP status code 506. |
| Status507InsufficientStorage |
HTTP status code 507. |
| Status508LoopDetected |
HTTP status code 508. |
| Status510NotExtended |
HTTP status code 510. |
| Status511NetworkAuthenticationRequired |
HTTP status code 511. |
Applies to
Feedback
Was this page helpful?
