Other 3xx codes
All HTTP status codes in ASP.NET Core
3xx Redirection
The result is at another URL that the client should fetch with GET, typically after a form POST (Post/Redirect/Get).
In ASP.NET Core: There is no named helper; use Results.StatusCode(303) with a Location header, or a redirect after a form post.
The StatusCodes constant, HttpStatusCode enum name, reason phrase, class, and how EnsureSuccessStatusCode() and the standard resilience handler treat 303.
| Constant | StatusCodes.Status303SeeOther |
|---|---|
| HttpStatusCode | HttpStatusCode.SeeOther, HttpStatusCode.RedirectMethod (aliases, same value) |
| Reason phrase | Kestrel sends See Other |
| Class | 3xx, redirection |
| IsSuccessStatusCode | false |
| EnsureSuccessStatusCode() | throws HttpRequestException: Response status code does not indicate success: 303 (See Other). |
| Standard resilience handler | does not retry it |
| HttpClient redirect | GET: followed, as GET. POST: followed, as GET. |
Results.StatusCode(StatusCodes.Status303SeeOther)
Results.Problem(statusCode: StatusCodes.Status303SeeOther, detail: "...")StatusCode(StatusCodes.Status303SeeOther)
Problem(statusCode: StatusCodes.Status303SeeOther, detail: "...")What Results.Problem(statusCode: 303) sends (with AddProblemDetails()), as application/problem+json:
{
"title": "See Other",
"status": 303,
"traceId": "0HNA1B2C3D4E5:00000001"
}A controller's Problem(statusCode: 303) sends a different body, because MVC only fills type and title for codes in ApiBehaviorOptions.ClientErrorMapping:
{
"status": 303,
"traceId": "0HNA1B2C3D4E5:00000001"
}Every response on this page was recorded from ASP.NET Core 10.0.12 on Kestrel in the Production environment; the HttpClient rows come from .NET 10.0.12 and Microsoft.Extensions.Http.Resilience 10.10.0.
All HTTP status codes in ASP.NET Core