1126 references to StatusCodes
Aspire.Dashboard (10)
Api\ApiAuthenticationHandler.cs (2)
114Context.Response.StatusCode = StatusCodes.Status401Unauthorized; 132Context.Response.StatusCode = StatusCodes.Status401Unauthorized;
DashboardEndpointsBuilder.cs (4)
153Status = StatusCodes.Status404NotFound 184Status = StatusCodes.Status404NotFound 205Status = StatusCodes.Status404NotFound 223Status = StatusCodes.Status404NotFound
Otlp\Http\OtlpHttpEndpointsBuilder.cs (3)
109httpContext.Response.StatusCode = StatusCodes.Status415UnsupportedMediaType; 171context.Response.StatusCode = StatusCodes.Status400BadRequest; 271StatusCodes.Status400BadRequest);
Utils\RoutingExtensions.cs (1)
23context.Response.StatusCode = StatusCodes.Status404NotFound;
Microsoft.AspNetCore (1)
Internal\CsrfProtectionMiddleware.cs (1)
42context.Response.StatusCode = StatusCodes.Status400BadRequest;
Microsoft.AspNetCore.Components.Endpoints (5)
RazorComponentEndpointInvoker.cs (4)
183if (context.Response.StatusCode == StatusCodes.Status404NotFound && 216context.Response.StatusCode = StatusCodes.Status400BadRequest; 263context.Response.StatusCode = StatusCodes.Status400BadRequest; 289context.Response.StatusCode = StatusCodes.Status400BadRequest;
Rendering\EndpointHtmlRenderer.EventDispatch.cs (1)
84_httpContext.Response.StatusCode = StatusCodes.Status404NotFound;
Microsoft.AspNetCore.Components.Server (3)
CircuitDisconnectMiddleware.cs (3)
36context.Response.StatusCode = StatusCodes.Status405MethodNotAllowed; 43context.Response.StatusCode = StatusCodes.Status400BadRequest; 49context.Response.StatusCode = StatusCodes.Status200OK;
Microsoft.AspNetCore.Cors (2)
Infrastructure\CorsMiddleware.cs (2)
125context.Response.StatusCode = StatusCodes.Status204NoContent; 183context.Response.StatusCode = StatusCodes.Status204NoContent;
Microsoft.AspNetCore.Diagnostics (4)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
127context.Response.StatusCode = StatusCodes.Status499ClientClosedRequest;
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (3)
22private const int DefaultStatusCode = StatusCodes.Status500InternalServerError; 123context.Response.StatusCode = StatusCodes.Status499ClientClosedRequest; 218if (result != ExceptionHandledType.Unhandled || _options.StatusCodeSelector != null || context.Response.StatusCode != StatusCodes.Status404NotFound || _options.AllowStatusCode404Response)
Microsoft.AspNetCore.Diagnostics.HealthChecks (3)
HealthCheckOptions.cs (3)
29{HealthStatus.Healthy, StatusCodes.Status200OK}, 30{HealthStatus.Degraded, StatusCodes.Status200OK}, 31{HealthStatus.Unhealthy, StatusCodes.Status503ServiceUnavailable},
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Logging\AcceptanceTests.cs (1)
111context.Response.StatusCode = StatusCodes.Status400BadRequest;
Microsoft.AspNetCore.Http (2)
Builder\ApplicationBuilder.cs (1)
186context.Response.StatusCode = StatusCodes.Status404NotFound;
Timeouts\RequestTimeoutsMiddleware.cs (1)
122context.Response.StatusCode = selectedPolicy?.TimeoutStatusCode ?? StatusCodes.Status504GatewayTimeout;
Microsoft.AspNetCore.Http.Abstractions (2)
BadHttpRequestException.cs (2)
29StatusCode = StatusCodes.Status400BadRequest; 52StatusCode = StatusCodes.Status400BadRequest;
Microsoft.AspNetCore.Http.Connections (25)
Internal\HttpConnectionContext.cs (4)
517nonClonedContext.Response.StatusCode = StatusCodes.Status409Conflict; 527nonClonedContext.Response.StatusCode = StatusCodes.Status404NotFound; 562context.Response.StatusCode = StatusCodes.Status204NoContent; 576context.Response.StatusCode = StatusCodes.Status204NoContent;
Internal\HttpConnectionDispatcher.cs (16)
98context.Response.StatusCode = StatusCodes.Status405MethodNotAllowed; 117context.Response.StatusCode = StatusCodes.Status405MethodNotAllowed; 273if (context.Response.StatusCode == StatusCodes.Status204NoContent) 464context.Response.StatusCode = StatusCodes.Status405MethodNotAllowed; 480context.Response.StatusCode = StatusCodes.Status404NotFound; 498context.Response.StatusCode = StatusCodes.Status404NotFound; 507context.Response.StatusCode = StatusCodes.Status404NotFound; 524context.Response.StatusCode = StatusCodes.Status400BadRequest; 556context.Response.StatusCode = StatusCodes.Status400BadRequest; 567context.Response.StatusCode = StatusCodes.Status202Accepted; 576context.Response.StatusCode = StatusCodes.Status404NotFound; 591context.Response.StatusCode = StatusCodes.Status409Conflict; 597context.Response.StatusCode = StatusCodes.Status400BadRequest; 785context.Response.StatusCode = StatusCodes.Status400BadRequest; 795context.Response.StatusCode = StatusCodes.Status404NotFound; 819context.Response.StatusCode = StatusCodes.Status404NotFound;
Internal\Transports\LongPollingServerTransport.cs (5)
45context.Response.StatusCode = StatusCodes.Status204NoContent; 88context.Response.StatusCode = StatusCodes.Status200OK; 94context.Response.StatusCode = StatusCodes.Status204NoContent; 102context.Response.StatusCode = StatusCodes.Status204NoContent; 109context.Response.StatusCode = StatusCodes.Status500InternalServerError;
Microsoft.AspNetCore.Http.Extensions (17)
RequestDelegateFactory.cs (11)
1402httpContext.Response.StatusCode = StatusCodes.Status415UnsupportedMediaType; 1418httpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 1424httpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 1440Status = StatusCodes.Status400BadRequest, 1541httpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 1548httpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 1555httpContext.Response.StatusCode = StatusCodes.Status415UnsupportedMediaType; 1572httpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 1578httpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 2794throw new BadHttpRequestException(message, StatusCodes.Status415UnsupportedMediaType); 2808throw new BadHttpRequestException(message, StatusCodes.Status415UnsupportedMediaType);
ResponseExtensions.cs (4)
46response.StatusCode = permanent ? StatusCodes.Status308PermanentRedirect : StatusCodes.Status307TemporaryRedirect; 50response.StatusCode = permanent ? StatusCodes.Status301MovedPermanently : StatusCodes.Status302Found;
src\aspnetcore\src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (2)
184StatusCodes.Status400BadRequest : 185StatusCodes.Status500InternalServerError;
Microsoft.AspNetCore.Http.Results (340)
Accepted.cs (3)
47/// Gets the HTTP status code: <see cref="StatusCodes.Status202Accepted"/> 49public int StatusCode => StatusCodes.Status202Accepted; 84builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status202Accepted, typeof(void)));
AcceptedAtRoute.cs (3)
70/// Gets the HTTP status code: <see cref="StatusCodes.Status202Accepted"/> 72public int StatusCode => StatusCodes.Status202Accepted; 111builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status202Accepted, typeof(void)));
AcceptedAtRouteOfT.cs (3)
84/// Gets the HTTP status code: <see cref="StatusCodes.Status202Accepted"/> 86public int StatusCode => StatusCodes.Status202Accepted; 125builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status202Accepted, ContentTypeConstants.ApplicationJsonContentTypes));
AcceptedOfT.cs (3)
63/// Gets the HTTP status code: <see cref="StatusCodes.Status202Accepted"/> 65public int StatusCode => StatusCodes.Status202Accepted; 103builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status202Accepted, ContentTypeConstants.ApplicationJsonContentTypes));
BadRequest.cs (3)
27/// Gets the HTTP status code: <see cref="StatusCodes.Status400BadRequest"/> 29public int StatusCode => StatusCodes.Status400BadRequest; 54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(void)));
BadRequestOfT.cs (3)
38/// Gets the HTTP status code: <see cref="StatusCodes.Status400BadRequest"/> 40public int StatusCode => StatusCodes.Status400BadRequest; 68builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status400BadRequest, ContentTypeConstants.ApplicationJsonContentTypes));
Conflict.cs (3)
27/// Gets the HTTP status code: <see cref="StatusCodes.Status409Conflict"/> 29public int StatusCode => StatusCodes.Status409Conflict; 54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status409Conflict, typeof(void)));
ConflictOfT.cs (3)
38/// Gets the HTTP status code: <see cref="StatusCodes.Status409Conflict"/> 40public int StatusCode => StatusCodes.Status409Conflict; 68builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status409Conflict, ContentTypeConstants.ApplicationJsonContentTypes));
Created.cs (3)
49/// Gets the HTTP status code: <see cref="StatusCodes.Status201Created"/> 51public int StatusCode => StatusCodes.Status201Created; 84builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(void)));
CreatedAtRoute.cs (3)
70/// Gets the HTTP status code: <see cref="StatusCodes.Status201Created"/> 72public int StatusCode => StatusCodes.Status201Created; 111builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status201Created, typeof(void)));
CreatedAtRouteOfT.cs (3)
84/// Gets the HTTP status code: <see cref="StatusCodes.Status201Created"/> 86public int StatusCode => StatusCodes.Status201Created; 128builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status201Created, ContentTypeConstants.ApplicationJsonContentTypes));
CreatedOfT.cs (3)
64/// Gets the HTTP status code: <see cref="StatusCodes.Status201Created"/> 66public int StatusCode => StatusCodes.Status201Created; 102builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status201Created, ContentTypeConstants.ApplicationJsonContentTypes));
InternalServerError.cs (3)
27/// Gets the HTTP status code: <see cref="StatusCodes.Status500InternalServerError"/> 29public int StatusCode => StatusCodes.Status500InternalServerError; 54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status500InternalServerError, typeof(void)));
InternalServerErrorOfT.cs (3)
38/// Gets the HTTP status code: <see cref="StatusCodes.Status500InternalServerError"/> 40public int StatusCode => StatusCodes.Status500InternalServerError; 68builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status500InternalServerError, ContentTypeConstants.ApplicationJsonContentTypes));
NoContent.cs (3)
26/// Gets the HTTP status code: <see cref="StatusCodes.Status204NoContent"/> 28public int StatusCode => StatusCodes.Status204NoContent; 54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status204NoContent, typeof(void)));
NotFound.cs (3)
26/// Gets the HTTP status code: <see cref="StatusCodes.Status404NotFound"/> 28public int StatusCode => StatusCodes.Status404NotFound; 53builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status404NotFound, typeof(void)));
NotFoundOfT.cs (3)
37/// Gets the HTTP status code: <see cref="StatusCodes.Status404NotFound"/> 39public int StatusCode => StatusCodes.Status404NotFound; 67builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status404NotFound, ContentTypeConstants.ApplicationJsonContentTypes));
Ok.cs (3)
26/// Gets the HTTP status code: <see cref="StatusCodes.Status200OK"/> 28public int StatusCode => StatusCodes.Status200OK; 53builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(void)));
OkOfT.cs (3)
37/// Gets the HTTP status code: <see cref="StatusCodes.Status200OK"/> 39public int StatusCode => StatusCodes.Status200OK; 67builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status200OK, ContentTypeConstants.ApplicationJsonContentTypes));
RedirectHttpResult.cs (2)
112? StatusCodes.Status308PermanentRedirect 113: StatusCodes.Status307TemporaryRedirect;
RedirectToRouteHttpResult.cs (2)
182StatusCodes.Status308PermanentRedirect : StatusCodes.Status307TemporaryRedirect;
Results.cs (66)
31/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 47/// By default, executing this result returns a <see cref="StatusCodes.Status403Forbidden"/>. Some authentication schemes, such as cookies, 48/// will convert <see cref="StatusCodes.Status403Forbidden"/> to a redirect to show a login page. 56/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 281/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 282/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 306/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 307/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 331/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 332/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 354/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 355/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 385/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 386/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 416/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 417/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 463/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 464/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 489/// <description>When <paramref name="permanent"/> and <paramref name="preserveMethod"/> are set, sets the <see cref="StatusCodes.Status308PermanentRedirect"/> status code.</description> 492/// <description>When <paramref name="preserveMethod"/> is set, sets the <see cref="StatusCodes.Status307TemporaryRedirect"/> status code.</description> 495/// <description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description> 498/// <description>Otherwise, configures <see cref="StatusCodes.Status302Found"/>.</description> 513/// <description>When <paramref name="permanent"/> and <paramref name="preserveMethod"/> are set, sets the <see cref="StatusCodes.Status308PermanentRedirect"/> status code.</description> 516/// <description>When <paramref name="preserveMethod"/> is set, sets the <see cref="StatusCodes.Status307TemporaryRedirect"/> status code.</description> 519/// <description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description> 522/// <description>Otherwise, configures <see cref="StatusCodes.Status302Found"/>.</description> 537/// <description>When <paramref name="permanent"/> and <paramref name="preserveMethod"/> are set, sets the <see cref="StatusCodes.Status308PermanentRedirect"/> status code.</description> 540/// <description>When <paramref name="preserveMethod"/> is set, sets the <see cref="StatusCodes.Status307TemporaryRedirect"/> status code.</description> 543/// <description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description> 546/// <description>Otherwise, configures <see cref="StatusCodes.Status302Found"/>.</description> 564/// <description>When <paramref name="permanent"/> and <paramref name="preserveMethod"/> are set, sets the <see cref="StatusCodes.Status308PermanentRedirect"/> status code.</description> 567/// <description>When <paramref name="preserveMethod"/> is set, sets the <see cref="StatusCodes.Status307TemporaryRedirect"/> status code.</description> 570/// <description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description> 573/// <description>Otherwise, configures <see cref="StatusCodes.Status302Found"/>.</description> 597/// Produces a <see cref="StatusCodes.Status404NotFound"/> response. 605/// Produces a <see cref="StatusCodes.Status404NotFound"/> response. 613/// Produces a <see cref="StatusCodes.Status401Unauthorized"/> response. 620/// Produces a <see cref="StatusCodes.Status400BadRequest"/> response. 628/// Produces a <see cref="StatusCodes.Status400BadRequest"/> response. 636/// Produces a <see cref="StatusCodes.Status409Conflict"/> response. 644/// Produces a <see cref="StatusCodes.Status409Conflict"/> response. 652/// Produces a <see cref="StatusCodes.Status204NoContent"/> response. 659/// Produces a <see cref="StatusCodes.Status200OK"/> response. 667/// Produces a <see cref="StatusCodes.Status200OK"/> response. 675/// Produces a <see cref="StatusCodes.Status422UnprocessableEntity"/> response. 683/// Produces a <see cref="StatusCodes.Status422UnprocessableEntity"/> response. 691/// Produces a <see cref="StatusCodes.Status500InternalServerError"/> response. 698/// Produces a <see cref="StatusCodes.Status500InternalServerError"/> response. 754/// Produces a <see cref="StatusCodes.Status400BadRequest"/> response 778/// Produces a <see cref="StatusCodes.Status400BadRequest"/> response 830/// Produces a <see cref="StatusCodes.Status201Created"/> response. 837/// Produces a <see cref="StatusCodes.Status201Created"/> response. 846/// Produces a <see cref="StatusCodes.Status201Created"/> response. 855/// Produces a <see cref="StatusCodes.Status201Created"/> response. 864/// Produces a <see cref="StatusCodes.Status201Created"/> response. 873/// Produces a <see cref="StatusCodes.Status201Created"/> response. 884/// Produces a <see cref="StatusCodes.Status201Created"/> response. 896/// Produces a <see cref="StatusCodes.Status201Created"/> response. 907/// Produces a <see cref="StatusCodes.Status201Created"/> response. 919/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 928/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 937/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 948/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 960/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 971/// Produces a <see cref="StatusCodes.Status202Accepted"/> response.
ResultsCache.StatusCodes.cs (122)
88StatusCodes.Status101SwitchingProtocols => _status101SwitchingProtocols ??= new(StatusCodes.Status101SwitchingProtocols), 89StatusCodes.Status102Processing => _status102Processing ??= new(StatusCodes.Status102Processing), 90StatusCodes.Status200OK => _status200OK ??= new(StatusCodes.Status200OK), 91StatusCodes.Status201Created => _status201Created ??= new(StatusCodes.Status201Created), 92StatusCodes.Status202Accepted => _status202Accepted ??= new(StatusCodes.Status202Accepted), 93StatusCodes.Status203NonAuthoritative => _status203NonAuthoritative ??= new(StatusCodes.Status203NonAuthoritative), 94StatusCodes.Status204NoContent => _status204NoContent ??= new(StatusCodes.Status204NoContent), 95StatusCodes.Status205ResetContent => _status205ResetContent ??= new(StatusCodes.Status205ResetContent), 96StatusCodes.Status206PartialContent => _status206PartialContent ??= new(StatusCodes.Status206PartialContent), 97StatusCodes.Status207MultiStatus => _status207MultiStatus ??= new(StatusCodes.Status207MultiStatus), 98StatusCodes.Status208AlreadyReported => _status208AlreadyReported ??= new(StatusCodes.Status208AlreadyReported), 99StatusCodes.Status226IMUsed => _status226IMUsed ??= new(StatusCodes.Status226IMUsed), 100StatusCodes.Status300MultipleChoices => _status300MultipleChoices ??= new(StatusCodes.Status300MultipleChoices), 101StatusCodes.Status301MovedPermanently => _status301MovedPermanently ??= new(StatusCodes.Status301MovedPermanently), 102StatusCodes.Status302Found => _status302Found ??= new(StatusCodes.Status302Found), 103StatusCodes.Status303SeeOther => _status303SeeOther ??= new(StatusCodes.Status303SeeOther), 104StatusCodes.Status304NotModified => _status304NotModified ??= new(StatusCodes.Status304NotModified), 105StatusCodes.Status305UseProxy => _status305UseProxy ??= new(StatusCodes.Status305UseProxy), 106StatusCodes.Status306SwitchProxy => _status306SwitchProxy ??= new(StatusCodes.Status306SwitchProxy), 107StatusCodes.Status307TemporaryRedirect => _status307TemporaryRedirect ??= new(StatusCodes.Status307TemporaryRedirect), 108StatusCodes.Status308PermanentRedirect => _status308PermanentRedirect ??= new(StatusCodes.Status308PermanentRedirect), 109StatusCodes.Status400BadRequest => _status400BadRequest ??= new(StatusCodes.Status400BadRequest), 110StatusCodes.Status401Unauthorized => _status401Unauthorized ??= new(StatusCodes.Status401Unauthorized), 111StatusCodes.Status402PaymentRequired => _status402PaymentRequired ??= new(StatusCodes.Status402PaymentRequired), 112StatusCodes.Status403Forbidden => _status403Forbidden ??= new(StatusCodes.Status403Forbidden), 113StatusCodes.Status404NotFound => _status404NotFound ??= new(StatusCodes.Status404NotFound), 114StatusCodes.Status405MethodNotAllowed => _status405MethodNotAllowed ??= new(StatusCodes.Status405MethodNotAllowed), 115StatusCodes.Status406NotAcceptable => _status406NotAcceptable ??= new(StatusCodes.Status406NotAcceptable), 116StatusCodes.Status407ProxyAuthenticationRequired => _status407ProxyAuthenticationRequired ??= new(StatusCodes.Status407ProxyAuthenticationRequired), 117StatusCodes.Status408RequestTimeout => _status408RequestTimeout ??= new(StatusCodes.Status408RequestTimeout), 118StatusCodes.Status409Conflict => _status409Conflict ??= new(StatusCodes.Status409Conflict), 119StatusCodes.Status410Gone => _status410Gone ??= new(StatusCodes.Status410Gone), 120StatusCodes.Status411LengthRequired => _status411LengthRequired ??= new(StatusCodes.Status411LengthRequired), 121StatusCodes.Status412PreconditionFailed => _status412PreconditionFailed ??= new(StatusCodes.Status412PreconditionFailed), 122StatusCodes.Status413RequestEntityTooLarge => _status413RequestEntityTooLarge ??= new(StatusCodes.Status413RequestEntityTooLarge), 123StatusCodes.Status414RequestUriTooLong => _status414RequestUriTooLong ??= new(StatusCodes.Status414RequestUriTooLong), 124StatusCodes.Status415UnsupportedMediaType => _status415UnsupportedMediaType ??= new(StatusCodes.Status415UnsupportedMediaType), 125StatusCodes.Status416RequestedRangeNotSatisfiable => _status416RequestedRangeNotSatisfiable ??= new(StatusCodes.Status416RequestedRangeNotSatisfiable), 126StatusCodes.Status417ExpectationFailed => _status417ExpectationFailed ??= new(StatusCodes.Status417ExpectationFailed), 127StatusCodes.Status418ImATeapot => _status418ImATeapot ??= new(StatusCodes.Status418ImATeapot), 128StatusCodes.Status419AuthenticationTimeout => _status419AuthenticationTimeout ??= new(StatusCodes.Status419AuthenticationTimeout), 129StatusCodes.Status421MisdirectedRequest => _status421MisdirectedRequest ??= new(StatusCodes.Status421MisdirectedRequest), 130StatusCodes.Status422UnprocessableEntity => _status422UnprocessableEntity ??= new(StatusCodes.Status422UnprocessableEntity), 131StatusCodes.Status423Locked => _status423Locked ??= new(StatusCodes.Status423Locked), 132StatusCodes.Status424FailedDependency => _status424FailedDependency ??= new(StatusCodes.Status424FailedDependency), 133StatusCodes.Status426UpgradeRequired => _status426UpgradeRequired ??= new(StatusCodes.Status426UpgradeRequired), 134StatusCodes.Status428PreconditionRequired => _status428PreconditionRequired ??= new(StatusCodes.Status428PreconditionRequired), 135StatusCodes.Status429TooManyRequests => _status429TooManyRequests ??= new(StatusCodes.Status429TooManyRequests), 136StatusCodes.Status431RequestHeaderFieldsTooLarge => _status431RequestHeaderFieldsTooLarge ??= new(StatusCodes.Status431RequestHeaderFieldsTooLarge), 137StatusCodes.Status451UnavailableForLegalReasons => _status451UnavailableForLegalReasons ??= new(StatusCodes.Status451UnavailableForLegalReasons), 138StatusCodes.Status500InternalServerError => _status500InternalServerError ??= new(StatusCodes.Status500InternalServerError), 139StatusCodes.Status501NotImplemented => _status501NotImplemented ??= new(StatusCodes.Status501NotImplemented), 140StatusCodes.Status502BadGateway => _status502BadGateway ??= new(StatusCodes.Status502BadGateway), 141StatusCodes.Status503ServiceUnavailable => _status503ServiceUnavailable ??= new(StatusCodes.Status503ServiceUnavailable), 142StatusCodes.Status504GatewayTimeout => _status504GatewayTimeout ??= new(StatusCodes.Status504GatewayTimeout), 143StatusCodes.Status505HttpVersionNotsupported => _status505HttpVersionNotsupported ??= new(StatusCodes.Status505HttpVersionNotsupported), 144StatusCodes.Status506VariantAlsoNegotiates => _status506VariantAlsoNegotiates ??= new(StatusCodes.Status506VariantAlsoNegotiates), 145StatusCodes.Status507InsufficientStorage => _status507InsufficientStorage ??= new(StatusCodes.Status507InsufficientStorage), 146StatusCodes.Status508LoopDetected => _status508LoopDetected ??= new(StatusCodes.Status508LoopDetected), 147StatusCodes.Status510NotExtended => _status510NotExtended ??= new(StatusCodes.Status510NotExtended), 148StatusCodes.Status511NetworkAuthenticationRequired => _status511NetworkAuthenticationRequired ??= new(StatusCodes.Status511NetworkAuthenticationRequired),
ServerSentEventsResult.cs (2)
26public int? StatusCode => StatusCodes.Status200OK; 107builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status200OK, typeof(SseItem<T>), contentTypes: ["text/event-stream"]));
src\aspnetcore\src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (2)
184StatusCodes.Status400BadRequest : 185StatusCodes.Status500InternalServerError;
src\aspnetcore\src\Shared\ResultsHelpers\FileResultHelper.cs (4)
117response.StatusCode = StatusCodes.Status304NotModified; 122response.StatusCode = StatusCodes.Status412PreconditionFailed; 315response.StatusCode = StatusCodes.Status416RangeNotSatisfiable; 322response.StatusCode = StatusCodes.Status206PartialContent;
TypedResults.cs (70)
31/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 47/// By default, executing this result returns a <see cref="StatusCodes.Status403Forbidden"/>. Some authentication schemes, such as cookies, 48/// will convert <see cref="StatusCodes.Status403Forbidden"/> to a redirect to show a login page. 52/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 245/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 246/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 280/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 281/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 315/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 316/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 344/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 345/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 385/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 386/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 426/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 427/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 492/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 493/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 525/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 526/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 558/// <item><description>When <paramref name="permanent"/> and <paramref name="preserveMethod"/> are set, sets the <see cref="StatusCodes.Status308PermanentRedirect"/> status code.</description></item> 559/// <item><description>When <paramref name="preserveMethod"/> is set, sets the <see cref="StatusCodes.Status307TemporaryRedirect"/> status code.</description></item> 560/// <item><description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description></item> 561/// <item>Otherwise, configures <see cref="StatusCodes.Status302Found"/>.</item> 578/// <item><description>When <paramref name="permanent"/> and <paramref name="preserveMethod"/> are set, sets the <see cref="StatusCodes.Status308PermanentRedirect"/> status code.</description></item> 579/// <item><description>When <paramref name="preserveMethod"/> is set, sets the <see cref="StatusCodes.Status307TemporaryRedirect"/> status code.</description></item> 580/// <item><description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description></item> 581/// <item>Otherwise, configures <see cref="StatusCodes.Status302Found"/>.</item> 598/// <item><description>When <paramref name="permanent"/> and <paramref name="preserveMethod"/> are set, sets the <see cref="StatusCodes.Status308PermanentRedirect"/> status code.</description></item> 599/// <item><description>When <paramref name="preserveMethod"/> is set, sets the <see cref="StatusCodes.Status307TemporaryRedirect"/> status code.</description></item> 600/// <item><description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description></item> 601/// <item><description>Otherwise, configures <see cref="StatusCodes.Status302Found"/>.</description></item> 622/// <item><description>When <paramref name="permanent"/> and <paramref name="preserveMethod"/> are set, sets the <see cref="StatusCodes.Status308PermanentRedirect"/> status code.</description></item> 623/// <item><description>When <paramref name="preserveMethod"/> is set, sets the <see cref="StatusCodes.Status307TemporaryRedirect"/> status code.</description></item> 624/// <item><description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description></item> 625/// <item><description>Otherwise, configures <see cref="StatusCodes.Status302Found"/>.</description></item> 653/// Produces a <see cref="StatusCodes.Status404NotFound"/> response. 659/// Produces a <see cref="StatusCodes.Status404NotFound"/> response. 667/// Produces a <see cref="StatusCodes.Status401Unauthorized"/> response. 673/// Produces a <see cref="StatusCodes.Status400BadRequest"/> response. 679/// Produces a <see cref="StatusCodes.Status400BadRequest"/> response. 687/// Produces a <see cref="StatusCodes.Status409Conflict"/> response. 693/// Produces a <see cref="StatusCodes.Status409Conflict"/> response. 701/// Produces a <see cref="StatusCodes.Status204NoContent"/> response. 707/// Produces a <see cref="StatusCodes.Status200OK"/> response. 713/// Produces a <see cref="StatusCodes.Status200OK"/> response. 721/// Produces a <see cref="StatusCodes.Status422UnprocessableEntity"/> response. 727/// Produces a <see cref="StatusCodes.Status422UnprocessableEntity"/> response. 735/// Produces a <see cref="StatusCodes.Status500InternalServerError"/> response. 741/// Produces a <see cref="StatusCodes.Status500InternalServerError"/> response. 816/// Produces a <see cref="StatusCodes.Status400BadRequest"/> response with an <see cref="HttpValidationProblemDetails"/> value. 837/// Produces a <see cref="StatusCodes.Status400BadRequest"/> response with an <see cref="HttpValidationProblemDetails"/> value. 884/// Produces a <see cref="StatusCodes.Status201Created"/> response. 893/// Produces a <see cref="StatusCodes.Status201Created"/> response. 903/// Produces a <see cref="StatusCodes.Status201Created"/> response. 915/// Produces a <see cref="StatusCodes.Status201Created"/> response. 925/// Produces a <see cref="StatusCodes.Status201Created"/> response. 937/// Produces a <see cref="StatusCodes.Status201Created"/> response. 949/// Produces a <see cref="StatusCodes.Status201Created"/> response. 958/// Produces a <see cref="StatusCodes.Status201Created"/> response. 972/// Produces a <see cref="StatusCodes.Status201Created"/> response. 983/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 991/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 1001/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 1013/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 1027/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 1039/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 1048/// Produces a <see cref="StatusCodes.Status202Accepted"/> response. 1062/// Produces a <see cref="StatusCodes.Status202Accepted"/> response.
UnauthorizedHttpResult.cs (2)
23/// Gets the HTTP status code: <see cref="StatusCodes.Status401Unauthorized"/> 25public int StatusCode => StatusCodes.Status401Unauthorized;
UnprocessableEntity.cs (3)
27/// Gets the HTTP status code: <see cref="StatusCodes.Status422UnprocessableEntity"/> 29public int StatusCode => StatusCodes.Status422UnprocessableEntity; 54builder.Metadata.Add(new ProducesResponseTypeMetadata(StatusCodes.Status422UnprocessableEntity, typeof(void)));
UnprocessableEntityOfT.cs (3)
38/// Gets the HTTP status code: <see cref="StatusCodes.Status422UnprocessableEntity"/> 40public int StatusCode => StatusCodes.Status422UnprocessableEntity; 68builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(TValue), StatusCodes.Status422UnprocessableEntity, ContentTypeConstants.ApplicationJsonContentTypes));
ValidationProblem.cs (5)
21if (problemDetails is { Status: not null and not StatusCodes.Status400BadRequest }) 27ProblemDetailsDefaults.Apply(ProblemDetails, statusCode: StatusCodes.Status400BadRequest); 45/// Gets the HTTP status code: <see cref="StatusCodes.Status400BadRequest"/> 47public int StatusCode => StatusCodes.Status400BadRequest; 79builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(HttpValidationProblemDetails), StatusCodes.Status400BadRequest, ContentTypeConstants.ProblemDetailsContentTypes));
Microsoft.AspNetCore.HttpsPolicy (1)
HttpsRedirectionOptions.cs (1)
16public int RedirectStatusCode { get; set; } = StatusCodes.Status307TemporaryRedirect;
Microsoft.AspNetCore.Identity (8)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (7)
1407httpContext.Response.StatusCode = StatusCodes.Status415UnsupportedMediaType; 1424httpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 1430httpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 1446Status = StatusCodes.Status400BadRequest, 1467httpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 1635throw new BadHttpRequestException(message, StatusCodes.Status415UnsupportedMediaType); 1652throw new BadHttpRequestException(message, StatusCodes.Status415UnsupportedMediaType);
IdentityApiEndpointRouteBuilderExtensions.cs (1)
115return TypedResults.Problem(result.ToString(), statusCode: StatusCodes.Status401Unauthorized);
Microsoft.AspNetCore.Mvc.ApiExplorer (6)
ApiResponseTypeProvider.cs (6)
128var defaultKey = new ResponseKey(StatusCodes.Status200OK, declaredReturnType); 131StatusCode = StatusCodes.Status200OK, 234if (declaredReturnType != null && (statusCode == StatusCodes.Status200OK || statusCode == StatusCodes.Status201Created)) 331if (inferredType != null && (statusCode == StatusCodes.Status200OK || statusCode == StatusCodes.Status201Created))
Microsoft.AspNetCore.Mvc.Core (278)
AcceptedAtActionResult.cs (1)
19private const int DefaultStatusCode = StatusCodes.Status202Accepted;
AcceptedAtRouteResult.cs (1)
19private const int DefaultStatusCode = StatusCodes.Status202Accepted;
AcceptedResult.cs (1)
15private const int DefaultStatusCode = StatusCodes.Status202Accepted;
ActionResultOfT.cs (1)
16private const int DefaultStatusCode = StatusCodes.Status200OK;
BadRequestObjectResult.cs (1)
16private const int DefaultStatusCode = StatusCodes.Status400BadRequest;
BadRequestResult.cs (1)
16private const int DefaultStatusCode = StatusCodes.Status400BadRequest;
ConflictObjectResult.cs (1)
16private const int DefaultStatusCode = StatusCodes.Status409Conflict;
ConflictResult.cs (1)
15private const int DefaultStatusCode = StatusCodes.Status409Conflict;
ContentResult.cs (1)
26/// Gets or sets the <see cref="Microsoft.AspNetCore.Http.StatusCodes">HTTP status code</see>.
ControllerBase.cs (212)
296/// <see cref="StatusCodes.Status204NoContent"/> response. 304/// Creates an <see cref="OkResult"/> object that produces an empty <see cref="StatusCodes.Status200OK"/> response. 312/// Creates an <see cref="OkObjectResult"/> object that produces a <see cref="StatusCodes.Status200OK"/> response. 322/// Creates a <see cref="RedirectResult"/> object that redirects (<see cref="StatusCodes.Status302Found"/>) 337/// (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="url"/>. 351/// and <see cref="RedirectResult.PreserveMethod"/> set to true (<see cref="StatusCodes.Status307TemporaryRedirect"/>) 366/// and <see cref="RedirectResult.PreserveMethod"/> set to true (<see cref="StatusCodes.Status308PermanentRedirect"/>) 381/// (<see cref="StatusCodes.Status302Found"/>) to the specified local <paramref name="localUrl"/>. 395/// true (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="localUrl"/>. 410/// (<see cref="StatusCodes.Status307TemporaryRedirect"/>) using the specified <paramref name="localUrl"/>. 425/// (<see cref="StatusCodes.Status308PermanentRedirect"/>) using the specified <paramref name="localUrl"/>. 438/// Redirects (<see cref="StatusCodes.Status302Found"/>) to an action with the same name as current one. 466/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the <paramref name="actionName"/>. 475/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the 486/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the 497/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified 512/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified 527/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified <paramref name="actionName"/>, 549/// Redirects (<see cref="StatusCodes.Status307TemporaryRedirect"/>) to the specified action with 579/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 589/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 601/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 613/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 629/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 645/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 673/// Redirects (<see cref="StatusCodes.Status308PermanentRedirect"/>) to the specified action with 703/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified <paramref name="routeName"/>. 712/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified <paramref name="routeValues"/>. 721/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified 732/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified 743/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified 763/// Redirects (<see cref="StatusCodes.Status307TemporaryRedirect"/>) to the specified route with 789/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 799/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 809/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 821/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 833/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 854/// Redirects (<see cref="StatusCodes.Status308PermanentRedirect"/>) to the specified route with 880/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/>. 889/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 900/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 911/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/>. 922/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 934/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 947/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/>. 956/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 967/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 978/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 990/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1007/// Redirects (<see cref="StatusCodes.Status307TemporaryRedirect"/>) to the specified page with 1035/// Redirects (<see cref="StatusCodes.Status308PermanentRedirect"/>) to the specified route with 1065/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), 1067/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1068/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1078/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), 1080/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1081/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1092/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), the 1094/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1095/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1106/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), the 1108/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1109/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1125/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), 1127/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1128/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1146/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), 1148/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1149/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1169/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), the 1171/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1172/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1192/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), the 1194/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1195/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1217/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>), with the 1219/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1220/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1233/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>), with the 1235/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1236/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1250/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>) with the 1253/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1254/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1268/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>) with the 1271/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1272/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1291/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>), 1293/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1294/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1315/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>), 1317/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1318/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1341/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>), the 1343/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1344/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1367/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>), the 1369/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1370/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1395/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 1397/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1398/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1408/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 1410/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1411/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1422/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 1425/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1426/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1437/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 1440/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1441/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1457/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>), and the 1459/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1460/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1478/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>), and the 1480/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1481/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1501/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>), the 1503/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1504/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1524/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>), the 1526/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1527/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1549/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 1551/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1552/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1562/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 1564/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1565/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1576/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 1579/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1580/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1594/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 1597/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1598/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1618/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>), and 1620/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1621/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1639/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>), and 1641/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1642/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1662/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>), the 1664/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1665/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1685/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>), the 1687/// This supports range requests (<see cref="StatusCodes.Status206PartialContent"/> or 1688/// <see cref="StatusCodes.Status416RangeNotSatisfiable"/> if the range is not satisfiable). 1711/// Creates an <see cref="UnauthorizedResult"/> that produces a <see cref="StatusCodes.Status401Unauthorized"/> response. 1719/// Creates an <see cref="UnauthorizedObjectResult"/> that produces a <see cref="StatusCodes.Status401Unauthorized"/> response. 1727/// Creates a <see cref="NotFoundResult"/> that produces a <see cref="StatusCodes.Status404NotFound"/> response. 1735/// Creates a <see cref="NotFoundObjectResult"/> that produces a <see cref="StatusCodes.Status404NotFound"/> response. 1743/// Creates a <see cref="BadRequestResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response. 1751/// Creates a <see cref="BadRequestObjectResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response. 1760/// Creates a <see cref="BadRequestObjectResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response. 1773/// Creates an <see cref="UnprocessableEntityResult"/> that produces a <see cref="StatusCodes.Status422UnprocessableEntity"/> response. 1781/// Creates an <see cref="UnprocessableEntityObjectResult"/> that produces a <see cref="StatusCodes.Status422UnprocessableEntity"/> response. 1790/// Creates an <see cref="UnprocessableEntityObjectResult"/> that produces a <see cref="StatusCodes.Status422UnprocessableEntity"/> response. 1803/// Creates a <see cref="ConflictResult"/> that produces a <see cref="StatusCodes.Status409Conflict"/> response. 1811/// Creates a <see cref="ConflictObjectResult"/> that produces a <see cref="StatusCodes.Status409Conflict"/> response. 1820/// Creates a <see cref="ConflictObjectResult"/> that produces a <see cref="StatusCodes.Status409Conflict"/> response. 1905/// Creates a <see cref="BadRequestObjectResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response. 1909[DefaultStatusCode(StatusCodes.Status400BadRequest)] 1918/// Creates an <see cref="ActionResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response 1924[DefaultStatusCode(StatusCodes.Status400BadRequest)] 1929/// Creates an <see cref="ActionResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response 1934[DefaultStatusCode(StatusCodes.Status400BadRequest)] 1939/// Creates an <see cref="ActionResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response 1952[DefaultStatusCode(StatusCodes.Status400BadRequest)] 1963/// Creates an <see cref="ActionResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response 1976[DefaultStatusCode(StatusCodes.Status400BadRequest)] 2034/// Creates a <see cref="CreatedResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response. 2044/// Creates a <see cref="CreatedResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response. 2056/// Creates a <see cref="CreatedResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response. 2068/// Creates a <see cref="CreatedAtActionResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response. 2078/// Creates a <see cref="CreatedAtActionResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response. 2089/// Creates a <see cref="CreatedAtActionResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response. 2105/// Creates a <see cref="CreatedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response. 2115/// Creates a <see cref="CreatedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response. 2125/// Creates a <see cref="CreatedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status201Created"/> response. 2136/// Creates an <see cref="AcceptedResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2144/// Creates an <see cref="AcceptedResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2153/// Creates an <see cref="AcceptedResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2167/// Creates an <see cref="AcceptedResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2177/// Creates an <see cref="AcceptedResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2187/// Creates an <see cref="AcceptedResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2201/// Creates an <see cref="AcceptedAtActionResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2210/// Creates an <see cref="AcceptedAtActionResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2220/// Creates an <see cref="AcceptedAtActionResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2230/// Creates an <see cref="AcceptedAtActionResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2241/// Creates an <see cref="AcceptedAtActionResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2252/// Creates an <see cref="AcceptedAtActionResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2268/// Creates an <see cref="AcceptedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2277/// Creates an <see cref="AcceptedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2286/// Creates an <see cref="AcceptedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2296/// Creates an <see cref="AcceptedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2306/// Creates an <see cref="AcceptedAtRouteResult"/> object that produces a <see cref="StatusCodes.Status202Accepted"/> response. 2322/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 2336/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 2351/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 2368/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 2378/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default). 2382/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 2390/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the 2396/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 2404/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the 2411/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 2419/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the 2427/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to
CreatedAtActionResult.cs (1)
19private const int DefaultStatusCode = StatusCodes.Status201Created;
CreatedAtRouteResult.cs (1)
19private const int DefaultStatusCode = StatusCodes.Status201Created;
CreatedResult.cs (1)
15private const int DefaultStatusCode = StatusCodes.Status201Created;
DefaultApiConventions.cs (20)
19[ProducesResponseType(StatusCodes.Status200OK)] 20[ProducesResponseType(StatusCodes.Status404NotFound)] 33[ProducesResponseType(StatusCodes.Status200OK)] 34[ProducesResponseType(StatusCodes.Status404NotFound)] 49[ProducesResponseType(StatusCodes.Status201Created)] 50[ProducesResponseType(StatusCodes.Status400BadRequest)] 63[ProducesResponseType(StatusCodes.Status201Created)] 64[ProducesResponseType(StatusCodes.Status400BadRequest)] 80[ProducesResponseType(StatusCodes.Status204NoContent)] 81[ProducesResponseType(StatusCodes.Status404NotFound)] 82[ProducesResponseType(StatusCodes.Status400BadRequest)] 100[ProducesResponseType(StatusCodes.Status204NoContent)] 101[ProducesResponseType(StatusCodes.Status404NotFound)] 102[ProducesResponseType(StatusCodes.Status400BadRequest)] 120[ProducesResponseType(StatusCodes.Status204NoContent)] 121[ProducesResponseType(StatusCodes.Status404NotFound)] 122[ProducesResponseType(StatusCodes.Status400BadRequest)] 141[ProducesResponseType(StatusCodes.Status200OK)] 142[ProducesResponseType(StatusCodes.Status404NotFound)] 143[ProducesResponseType(StatusCodes.Status400BadRequest)]
Formatters\HttpNoContentOutputFormatter.cs (2)
38if (response.StatusCode == StatusCodes.Status200OK) 40response.StatusCode = StatusCodes.Status204NoContent;
Formatters\TextOutputFormatter.cs (1)
130const int statusCode = StatusCodes.Status406NotAcceptable;
Infrastructure\LocalRedirectResultExecutor.cs (2)
55StatusCodes.Status308PermanentRedirect : StatusCodes.Status307TemporaryRedirect;
Infrastructure\ObjectResultExecutor.cs (1)
102const int statusCode = StatusCodes.Status406NotAcceptable;
Infrastructure\RedirectResultExecutor.cs (2)
52StatusCodes.Status308PermanentRedirect : StatusCodes.Status307TemporaryRedirect;
Infrastructure\RedirectToActionResultExecutor.cs (2)
58StatusCodes.Status308PermanentRedirect : StatusCodes.Status307TemporaryRedirect;
Infrastructure\RedirectToPageResultExecutor.cs (2)
58StatusCodes.Status308PermanentRedirect : StatusCodes.Status307TemporaryRedirect;
Infrastructure\RedirectToRouteResultExecutor.cs (2)
54StatusCodes.Status308PermanentRedirect : StatusCodes.Status307TemporaryRedirect;
NoContentResult.cs (1)
15private const int DefaultStatusCode = StatusCodes.Status204NoContent;
NotFoundObjectResult.cs (1)
15private const int DefaultStatusCode = StatusCodes.Status404NotFound;
NotFoundResult.cs (1)
16private const int DefaultStatusCode = StatusCodes.Status404NotFound;
OkObjectResult.cs (2)
11/// will produce a <see cref="StatusCodes.Status200OK"/> response if negotiation and formatting succeed. 16private const int DefaultStatusCode = StatusCodes.Status200OK;
OkResult.cs (2)
11/// <see cref="StatusCodes.Status200OK"/> response. 16private const int DefaultStatusCode = StatusCodes.Status200OK;
ProducesAttribute.cs (1)
64public int StatusCode => StatusCodes.Status200OK;
RequireHttpsAttribute.cs (1)
68filterContext.Result = new StatusCodeResult(StatusCodes.Status403Forbidden);
src\aspnetcore\src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (2)
184StatusCodes.Status400BadRequest : 185StatusCodes.Status500InternalServerError;
src\aspnetcore\src\Shared\ResultsHelpers\FileResultHelper.cs (4)
117response.StatusCode = StatusCodes.Status304NotModified; 122response.StatusCode = StatusCodes.Status412PreconditionFailed; 315response.StatusCode = StatusCodes.Status416RangeNotSatisfiable; 322response.StatusCode = StatusCodes.Status206PartialContent;
UnauthorizedObjectResult.cs (1)
15private const int DefaultStatusCode = StatusCodes.Status401Unauthorized;
UnauthorizedResult.cs (1)
16private const int DefaultStatusCode = StatusCodes.Status401Unauthorized;
UnprocessableEntityObjectResult.cs (1)
16private const int DefaultStatusCode = StatusCodes.Status422UnprocessableEntity;
UnprocessableEntityResult.cs (1)
16private const int DefaultStatusCode = StatusCodes.Status422UnprocessableEntity;
UnsupportedMediaTypeResult.cs (1)
16private const int DefaultStatusCode = StatusCodes.Status415UnsupportedMediaType;
Microsoft.AspNetCore.Mvc.Cors (2)
CorsAuthorizationFilter.cs (1)
95context.Result = new StatusCodeResult(StatusCodes.Status204NoContent);
DisableCorsAuthorizationFilter.cs (1)
35context.Result = new StatusCodeResult(StatusCodes.Status204NoContent);
Microsoft.AspNetCore.Mvc.RazorPages (167)
PageBase.cs (82)
124/// Creates a <see cref="BadRequestResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response. 131/// Creates a <see cref="BadRequestObjectResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response. 139/// Creates a <see cref="BadRequestObjectResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response. 156/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 169/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 183/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 199/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 208/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a 217/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a 227/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a 246/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a 262/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default). 266/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 273/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the 279/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 286/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the 293/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 300/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the 308/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 316/// (<see cref="StatusCodes.Status200OK"/>) and the specified <paramref name="contentType" /> as the Content-Type. 325/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), the 337/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>) 347/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>) with the 359/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 369/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 381/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 391/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 407/// (<see cref="StatusCodes.Status302Found"/>) to the specified local <paramref name="localUrl"/>. 420/// true (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="localUrl"/>. 434/// (<see cref="StatusCodes.Status307TemporaryRedirect"/>) using the specified <paramref name="localUrl"/>. 448/// (<see cref="StatusCodes.Status308PermanentRedirect"/>) using the specified <paramref name="localUrl"/>. 460/// Creates an <see cref="NotFoundResult"/> that produces a <see cref="StatusCodes.Status404NotFound"/> response. 467/// Creates an <see cref="NotFoundObjectResult"/> that produces a <see cref="StatusCodes.Status404NotFound"/> response. 497/// (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="url"/>. 510/// and <see cref="RedirectResult.PreserveMethod"/> set to true (<see cref="StatusCodes.Status307TemporaryRedirect"/>) 524/// and <see cref="RedirectResult.PreserveMethod"/> set to true (<see cref="StatusCodes.Status308PermanentRedirect"/>) 537/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the <paramref name="actionName"/>. 545/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the 555/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the 565/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified 579/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified 593/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified <paramref name="actionName"/>, 609/// Redirects (<see cref="StatusCodes.Status307TemporaryRedirect"/>) to the specified action with 635/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 646/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 659/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 672/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 689/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 706/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 730/// Redirects (<see cref="StatusCodes.Status308PermanentRedirect"/>) to the specified action with 756/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified <paramref name="routeName"/>. 766/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified <paramref name="routeValues"/>. 776/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified 788/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified 800/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified 816/// Redirects (<see cref="StatusCodes.Status307TemporaryRedirect"/>) to the specified route with 838/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 849/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 860/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 873/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 886/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 901/// Redirects (<see cref="StatusCodes.Status308PermanentRedirect"/>) to the specified route with 923/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the current page. 930/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the current page with the specified <paramref name="routeValues"/>. 938/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/>. 946/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 956/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 966/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 977/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 989/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/>. 997/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1007/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1017/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1028/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1039/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1051/// Redirects (<see cref="StatusCodes.Status307TemporaryRedirect"/>) to the specified page with 1076/// Redirects (<see cref="StatusCodes.Status308PermanentRedirect"/>) to the specified route with 1159/// Creates an <see cref="UnauthorizedResult"/> that produces an <see cref="StatusCodes.Status401Unauthorized"/> response.
PageModel.cs (85)
456/// Creates a <see cref="BadRequestResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response. 463/// Creates a <see cref="BadRequestObjectResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response. 471/// Creates a <see cref="BadRequestObjectResult"/> that produces a <see cref="StatusCodes.Status400BadRequest"/> response. 488/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 501/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 515/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 531/// <see cref="StatusCodes.Status401Unauthorized"/> and <see cref="StatusCodes.Status403Forbidden"/> 540/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a 549/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a 559/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a 578/// Creates a <see cref="ContentResult"/> object with <see cref="StatusCodes.Status200OK"/> by specifying a 594/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default). 598/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 605/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the 611/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 618/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the 625/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 632/// Creates a <see cref="ForbidResult"/> (<see cref="StatusCodes.Status403Forbidden"/> by default) with the 640/// Some authentication schemes, such as cookies, will convert <see cref="StatusCodes.Status403Forbidden"/> to 648/// (<see cref="StatusCodes.Status200OK"/>) and the specified <paramref name="contentType" /> as the Content-Type. 657/// Returns a file with the specified <paramref name="fileContents" /> as content (<see cref="StatusCodes.Status200OK"/>), the 669/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>) 679/// Returns a file in the specified <paramref name="fileStream" /> (<see cref="StatusCodes.Status200OK"/>) with the 691/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 701/// Returns the file specified by <paramref name="virtualPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 714/// (<see cref="StatusCodes.Status302Found"/>) to the specified local <paramref name="localUrl"/>. 727/// true (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="localUrl"/>. 741/// (<see cref="StatusCodes.Status307TemporaryRedirect"/>) using the specified <paramref name="localUrl"/>. 755/// (<see cref="StatusCodes.Status308PermanentRedirect"/>) using the specified <paramref name="localUrl"/>. 767/// Creates an <see cref="NotFoundResult"/> that produces a <see cref="StatusCodes.Status404NotFound"/> response. 774/// Creates an <see cref="NotFoundObjectResult"/> that produces a <see cref="StatusCodes.Status404NotFound"/> response. 787/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 797/// Returns the file specified by <paramref name="physicalPath" /> (<see cref="StatusCodes.Status200OK"/>) with the 812/// Creates a <see cref="RedirectResult"/> object that redirects (<see cref="StatusCodes.Status302Found"/>) 826/// (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="url"/>. 839/// and <see cref="RedirectResult.PreserveMethod"/> set to true (<see cref="StatusCodes.Status307TemporaryRedirect"/>) 853/// and <see cref="RedirectResult.PreserveMethod"/> set to true (<see cref="StatusCodes.Status308PermanentRedirect"/>) 866/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the <paramref name="actionName"/>. 874/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the 884/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the 894/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified 908/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified 922/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified action using the specified <paramref name="actionName"/>, 943/// Redirects (<see cref="StatusCodes.Status307TemporaryRedirect"/>) to the specified action with 972/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 981/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 992/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 1003/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 1018/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 1033/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified action with 1060/// Redirects (<see cref="StatusCodes.Status308PermanentRedirect"/>) to the specified action with 1089/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified <paramref name="routeName"/>. 1097/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified <paramref name="routeValues"/>. 1105/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified 1115/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified 1125/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified route using the specified 1144/// Redirects (<see cref="StatusCodes.Status307TemporaryRedirect"/>) to the specified route with 1169/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 1178/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 1187/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 1198/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 1209/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified route with 1229/// Redirects (<see cref="StatusCodes.Status308PermanentRedirect"/>) to the specified route with 1254/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the current page. 1261/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the current page with the specified <paramref name="routeValues"/>. 1269/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/>. 1277/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 1287/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 1298/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 1308/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 1319/// Redirects (<see cref="StatusCodes.Status302Found"/>) to the specified <paramref name="pageName"/> 1331/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/>. 1339/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1349/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/>. 1358/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1369/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1380/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1391/// Redirects (<see cref="StatusCodes.Status301MovedPermanently"/>) to the specified <paramref name="pageName"/> 1403/// Redirects (<see cref="StatusCodes.Status307TemporaryRedirect"/>) to the specified page with 1428/// Redirects (<see cref="StatusCodes.Status308PermanentRedirect"/>) to the specified route with 1516/// Creates an <see cref="UnauthorizedResult"/> that produces an <see cref="StatusCodes.Status401Unauthorized"/> response.
Microsoft.AspNetCore.OutputCaching (3)
OutputCacheMiddleware.cs (2)
287context.HttpContext.Response.StatusCode = StatusCodes.Status304NotModified; 368cacheContext.HttpContext.Response.StatusCode = StatusCodes.Status504GatewayTimeout;
Policies\DefaultPolicy.cs (1)
54if (response.StatusCode != StatusCodes.Status200OK)
Microsoft.AspNetCore.RateLimiting (2)
RateLimiterOptions.cs (2)
35/// Defaults to <see cref="StatusCodes.Status503ServiceUnavailable"/>. 41public int RejectionStatusCode { get; set; } = StatusCodes.Status503ServiceUnavailable;
Microsoft.AspNetCore.RequestDecompression (1)
RequestDecompressionMiddleware.cs (1)
67StatusCodes.Status413PayloadTooLarge));
Microsoft.AspNetCore.ResponseCaching (3)
ResponseCachingMiddleware.cs (2)
155context.HttpContext.Response.StatusCode = StatusCodes.Status304NotModified; 250context.HttpContext.Response.StatusCode = StatusCodes.Status504GatewayTimeout;
ResponseCachingPolicyProvider.cs (1)
116if (response.StatusCode != StatusCodes.Status200OK)
Microsoft.AspNetCore.Rewrite (18)
ApacheModRewrite\RuleBuilder.cs (1)
208responseStatusCode = StatusCodes.Status302Found;
IISUrlRewrite\RedirectType.cs (4)
10Permanent = StatusCodes.Status301MovedPermanently, 11Found = StatusCodes.Status302Found, 12SeeOther = StatusCodes.Status303SeeOther, 13Temporary = StatusCodes.Status307TemporaryRedirect
RewriteOptionsExtensions.cs (11)
62return AddRedirect(options, regex, replacement, statusCode: StatusCodes.Status302Found); 87return AddRedirectToHttps(options, statusCode: StatusCodes.Status301MovedPermanently, sslPort: null); 96return AddRedirectToHttps(options, statusCode: StatusCodes.Status302Found, sslPort: null); 128return AddRedirectToWww(options, statusCode: StatusCodes.Status308PermanentRedirect); 139return AddRedirectToWww(options, statusCode: StatusCodes.Status308PermanentRedirect, domains); 148return AddRedirectToWww(options, statusCode: StatusCodes.Status307TemporaryRedirect); 158return AddRedirectToWww(options, statusCode: StatusCodes.Status307TemporaryRedirect, domains); 191return AddRedirectToNonWww(options, statusCode: StatusCodes.Status308PermanentRedirect); 202return AddRedirectToNonWww(options, statusCode: StatusCodes.Status308PermanentRedirect, domains); 211return AddRedirectToNonWww(options, statusCode: StatusCodes.Status307TemporaryRedirect); 221return AddRedirectToNonWww(options, statusCode: StatusCodes.Status307TemporaryRedirect, domains);
UrlActions\ForbiddenAction.cs (1)
12context.HttpContext.Response.StatusCode = StatusCodes.Status403Forbidden;
UrlActions\GoneAction.cs (1)
12context.HttpContext.Response.StatusCode = StatusCodes.Status410Gone;
Microsoft.AspNetCore.Routing (11)
Builder\OpenApiRouteHandlerBuilderExtensions.cs (6)
43/// <param name="statusCode">The response status code. Defaults to <see cref="StatusCodes.Status200OK"/>.</param> 51int statusCode = StatusCodes.Status200OK, 138/// <param name="statusCode">The response status code. Defaults to <see cref="StatusCodes.Status400BadRequest"/>.</param> 143int statusCode = StatusCodes.Status400BadRequest, 159/// <param name="statusCode">The response status code. Defaults to <see cref="StatusCodes.Status400BadRequest"/>.</param> 166int statusCode = StatusCodes.Status400BadRequest,
Matching\AcceptsMatcherPolicy.cs (1)
253context.Response.StatusCode = StatusCodes.Status415UnsupportedMediaType;
Matching\HttpMethodMatcherPolicy.cs (1)
389context.Response.StatusCode = StatusCodes.Status405MethodNotAllowed;
Matching\NegotiationMatcherPolicy.cs (1)
352context.Response.StatusCode = StatusCodes.Status406NotAcceptable;
ValidationEndpointFilterFactory.cs (2)
98context.HttpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 102Status = StatusCodes.Status400BadRequest
Microsoft.AspNetCore.Server.IISIntegration (2)
IISMiddleware.cs (2)
106httpContext.Response.StatusCode = StatusCodes.Status400BadRequest; 117httpContext.Response.StatusCode = StatusCodes.Status202Accepted;
Microsoft.AspNetCore.Server.Kestrel.Core (179)
Internal\Http\HttpProtocol.cs (16)
387_statusCode = StatusCodes.Status200OK; 781StatusCode = StatusCodes.Status499ClientClosedRequest; 937StatusCode != StatusCodes.Status304NotModified && 1079SetErrorResponseHeaders(statusCode: StatusCodes.Status500InternalServerError); 1209else if (StatusCode == StatusCodes.Status205ResetContent && responseHeaders.ContentLength.Value != 0) 1217else if (StatusCode == StatusCodes.Status101SwitchingProtocols) 1292if (Is1xxCode(StatusCode) || StatusCode == StatusCodes.Status204NoContent) 1307static bool Is1xxCode(int code) => code >= StatusCodes.Status100Continue && code < StatusCodes.Status200OK; 1308static bool Is2xxCode(int code) => code >= StatusCodes.Status200OK && code < StatusCodes.Status300MultipleChoices; 1315StatusCode != StatusCodes.Status204NoContent && 1316StatusCode != StatusCodes.Status205ResetContent && 1317StatusCode != StatusCodes.Status304NotModified; 1327StatusCode != StatusCodes.Status304NotModified; 1355SetErrorResponseHeaders(statusCode: StatusCodes.Status500InternalServerError);
Internal\Http\HttpProtocol.FeatureCollection.cs (3)
283StatusCode = StatusCodes.Status101SwitchingProtocols; 304if (StatusCode < StatusCodes.Status200OK || StatusCodes.Status300MultipleChoices <= StatusCode)
Internal\Http\ReasonPhrases.cs (126)
13private static readonly byte[] _bytesStatus100 = CreateStatusBytes(StatusCodes.Status100Continue); 14private static readonly byte[] _bytesStatus101 = CreateStatusBytes(StatusCodes.Status101SwitchingProtocols); 15private static readonly byte[] _bytesStatus102 = CreateStatusBytes(StatusCodes.Status102Processing); 17private static readonly byte[] _bytesStatus200 = CreateStatusBytes(StatusCodes.Status200OK); 18private static readonly byte[] _bytesStatus201 = CreateStatusBytes(StatusCodes.Status201Created); 19private static readonly byte[] _bytesStatus202 = CreateStatusBytes(StatusCodes.Status202Accepted); 20private static readonly byte[] _bytesStatus203 = CreateStatusBytes(StatusCodes.Status203NonAuthoritative); 21private static readonly byte[] _bytesStatus204 = CreateStatusBytes(StatusCodes.Status204NoContent); 22private static readonly byte[] _bytesStatus205 = CreateStatusBytes(StatusCodes.Status205ResetContent); 23private static readonly byte[] _bytesStatus206 = CreateStatusBytes(StatusCodes.Status206PartialContent); 24private static readonly byte[] _bytesStatus207 = CreateStatusBytes(StatusCodes.Status207MultiStatus); 25private static readonly byte[] _bytesStatus208 = CreateStatusBytes(StatusCodes.Status208AlreadyReported); 26private static readonly byte[] _bytesStatus226 = CreateStatusBytes(StatusCodes.Status226IMUsed); 28private static readonly byte[] _bytesStatus300 = CreateStatusBytes(StatusCodes.Status300MultipleChoices); 29private static readonly byte[] _bytesStatus301 = CreateStatusBytes(StatusCodes.Status301MovedPermanently); 30private static readonly byte[] _bytesStatus302 = CreateStatusBytes(StatusCodes.Status302Found); 31private static readonly byte[] _bytesStatus303 = CreateStatusBytes(StatusCodes.Status303SeeOther); 32private static readonly byte[] _bytesStatus304 = CreateStatusBytes(StatusCodes.Status304NotModified); 33private static readonly byte[] _bytesStatus305 = CreateStatusBytes(StatusCodes.Status305UseProxy); 34private static readonly byte[] _bytesStatus306 = CreateStatusBytes(StatusCodes.Status306SwitchProxy); 35private static readonly byte[] _bytesStatus307 = CreateStatusBytes(StatusCodes.Status307TemporaryRedirect); 36private static readonly byte[] _bytesStatus308 = CreateStatusBytes(StatusCodes.Status308PermanentRedirect); 38private static readonly byte[] _bytesStatus400 = CreateStatusBytes(StatusCodes.Status400BadRequest); 39private static readonly byte[] _bytesStatus401 = CreateStatusBytes(StatusCodes.Status401Unauthorized); 40private static readonly byte[] _bytesStatus402 = CreateStatusBytes(StatusCodes.Status402PaymentRequired); 41private static readonly byte[] _bytesStatus403 = CreateStatusBytes(StatusCodes.Status403Forbidden); 42private static readonly byte[] _bytesStatus404 = CreateStatusBytes(StatusCodes.Status404NotFound); 43private static readonly byte[] _bytesStatus405 = CreateStatusBytes(StatusCodes.Status405MethodNotAllowed); 44private static readonly byte[] _bytesStatus406 = CreateStatusBytes(StatusCodes.Status406NotAcceptable); 45private static readonly byte[] _bytesStatus407 = CreateStatusBytes(StatusCodes.Status407ProxyAuthenticationRequired); 46private static readonly byte[] _bytesStatus408 = CreateStatusBytes(StatusCodes.Status408RequestTimeout); 47private static readonly byte[] _bytesStatus409 = CreateStatusBytes(StatusCodes.Status409Conflict); 48private static readonly byte[] _bytesStatus410 = CreateStatusBytes(StatusCodes.Status410Gone); 49private static readonly byte[] _bytesStatus411 = CreateStatusBytes(StatusCodes.Status411LengthRequired); 50private static readonly byte[] _bytesStatus412 = CreateStatusBytes(StatusCodes.Status412PreconditionFailed); 51private static readonly byte[] _bytesStatus413 = CreateStatusBytes(StatusCodes.Status413PayloadTooLarge); 52private static readonly byte[] _bytesStatus414 = CreateStatusBytes(StatusCodes.Status414UriTooLong); 53private static readonly byte[] _bytesStatus415 = CreateStatusBytes(StatusCodes.Status415UnsupportedMediaType); 54private static readonly byte[] _bytesStatus416 = CreateStatusBytes(StatusCodes.Status416RangeNotSatisfiable); 55private static readonly byte[] _bytesStatus417 = CreateStatusBytes(StatusCodes.Status417ExpectationFailed); 56private static readonly byte[] _bytesStatus418 = CreateStatusBytes(StatusCodes.Status418ImATeapot); 57private static readonly byte[] _bytesStatus419 = CreateStatusBytes(StatusCodes.Status419AuthenticationTimeout); 58private static readonly byte[] _bytesStatus421 = CreateStatusBytes(StatusCodes.Status421MisdirectedRequest); 59private static readonly byte[] _bytesStatus422 = CreateStatusBytes(StatusCodes.Status422UnprocessableEntity); 60private static readonly byte[] _bytesStatus423 = CreateStatusBytes(StatusCodes.Status423Locked); 61private static readonly byte[] _bytesStatus424 = CreateStatusBytes(StatusCodes.Status424FailedDependency); 62private static readonly byte[] _bytesStatus426 = CreateStatusBytes(StatusCodes.Status426UpgradeRequired); 63private static readonly byte[] _bytesStatus428 = CreateStatusBytes(StatusCodes.Status428PreconditionRequired); 64private static readonly byte[] _bytesStatus429 = CreateStatusBytes(StatusCodes.Status429TooManyRequests); 65private static readonly byte[] _bytesStatus431 = CreateStatusBytes(StatusCodes.Status431RequestHeaderFieldsTooLarge); 66private static readonly byte[] _bytesStatus451 = CreateStatusBytes(StatusCodes.Status451UnavailableForLegalReasons); 67private static readonly byte[] _bytesStatus499 = CreateStatusBytes(StatusCodes.Status499ClientClosedRequest); 69private static readonly byte[] _bytesStatus500 = CreateStatusBytes(StatusCodes.Status500InternalServerError); 70private static readonly byte[] _bytesStatus501 = CreateStatusBytes(StatusCodes.Status501NotImplemented); 71private static readonly byte[] _bytesStatus502 = CreateStatusBytes(StatusCodes.Status502BadGateway); 72private static readonly byte[] _bytesStatus503 = CreateStatusBytes(StatusCodes.Status503ServiceUnavailable); 73private static readonly byte[] _bytesStatus504 = CreateStatusBytes(StatusCodes.Status504GatewayTimeout); 74private static readonly byte[] _bytesStatus505 = CreateStatusBytes(StatusCodes.Status505HttpVersionNotsupported); 75private static readonly byte[] _bytesStatus506 = CreateStatusBytes(StatusCodes.Status506VariantAlsoNegotiates); 76private static readonly byte[] _bytesStatus507 = CreateStatusBytes(StatusCodes.Status507InsufficientStorage); 77private static readonly byte[] _bytesStatus508 = CreateStatusBytes(StatusCodes.Status508LoopDetected); 78private static readonly byte[] _bytesStatus510 = CreateStatusBytes(StatusCodes.Status510NotExtended); 79private static readonly byte[] _bytesStatus511 = CreateStatusBytes(StatusCodes.Status511NetworkAuthenticationRequired); 99StatusCodes.Status100Continue => _bytesStatus100, 100StatusCodes.Status101SwitchingProtocols => _bytesStatus101, 101StatusCodes.Status102Processing => _bytesStatus102, 103StatusCodes.Status200OK => _bytesStatus200, 104StatusCodes.Status201Created => _bytesStatus201, 105StatusCodes.Status202Accepted => _bytesStatus202, 106StatusCodes.Status203NonAuthoritative => _bytesStatus203, 107StatusCodes.Status204NoContent => _bytesStatus204, 108StatusCodes.Status205ResetContent => _bytesStatus205, 109StatusCodes.Status206PartialContent => _bytesStatus206, 110StatusCodes.Status207MultiStatus => _bytesStatus207, 111StatusCodes.Status208AlreadyReported => _bytesStatus208, 112StatusCodes.Status226IMUsed => _bytesStatus226, 114StatusCodes.Status300MultipleChoices => _bytesStatus300, 115StatusCodes.Status301MovedPermanently => _bytesStatus301, 116StatusCodes.Status302Found => _bytesStatus302, 117StatusCodes.Status303SeeOther => _bytesStatus303, 118StatusCodes.Status304NotModified => _bytesStatus304, 119StatusCodes.Status305UseProxy => _bytesStatus305, 120StatusCodes.Status306SwitchProxy => _bytesStatus306, 121StatusCodes.Status307TemporaryRedirect => _bytesStatus307, 122StatusCodes.Status308PermanentRedirect => _bytesStatus308, 124StatusCodes.Status400BadRequest => _bytesStatus400, 125StatusCodes.Status401Unauthorized => _bytesStatus401, 126StatusCodes.Status402PaymentRequired => _bytesStatus402, 127StatusCodes.Status403Forbidden => _bytesStatus403, 128StatusCodes.Status404NotFound => _bytesStatus404, 129StatusCodes.Status405MethodNotAllowed => _bytesStatus405, 130StatusCodes.Status406NotAcceptable => _bytesStatus406, 131StatusCodes.Status407ProxyAuthenticationRequired => _bytesStatus407, 132StatusCodes.Status408RequestTimeout => _bytesStatus408, 133StatusCodes.Status409Conflict => _bytesStatus409, 134StatusCodes.Status410Gone => _bytesStatus410, 135StatusCodes.Status411LengthRequired => _bytesStatus411, 136StatusCodes.Status412PreconditionFailed => _bytesStatus412, 137StatusCodes.Status413PayloadTooLarge => _bytesStatus413, 138StatusCodes.Status414UriTooLong => _bytesStatus414, 139StatusCodes.Status415UnsupportedMediaType => _bytesStatus415, 140StatusCodes.Status416RangeNotSatisfiable => _bytesStatus416, 141StatusCodes.Status417ExpectationFailed => _bytesStatus417, 142StatusCodes.Status418ImATeapot => _bytesStatus418, 143StatusCodes.Status419AuthenticationTimeout => _bytesStatus419, 144StatusCodes.Status421MisdirectedRequest => _bytesStatus421, 145StatusCodes.Status422UnprocessableEntity => _bytesStatus422, 146StatusCodes.Status423Locked => _bytesStatus423, 147StatusCodes.Status424FailedDependency => _bytesStatus424, 148StatusCodes.Status426UpgradeRequired => _bytesStatus426, 149StatusCodes.Status428PreconditionRequired => _bytesStatus428, 150StatusCodes.Status429TooManyRequests => _bytesStatus429, 151StatusCodes.Status431RequestHeaderFieldsTooLarge => _bytesStatus431, 152StatusCodes.Status451UnavailableForLegalReasons => _bytesStatus451, 153StatusCodes.Status499ClientClosedRequest => _bytesStatus499, 155StatusCodes.Status500InternalServerError => _bytesStatus500, 156StatusCodes.Status501NotImplemented => _bytesStatus501, 157StatusCodes.Status502BadGateway => _bytesStatus502, 158StatusCodes.Status503ServiceUnavailable => _bytesStatus503, 159StatusCodes.Status504GatewayTimeout => _bytesStatus504, 160StatusCodes.Status505HttpVersionNotsupported => _bytesStatus505, 161StatusCodes.Status506VariantAlsoNegotiates => _bytesStatus506, 162StatusCodes.Status507InsufficientStorage => _bytesStatus507, 163StatusCodes.Status508LoopDetected => _bytesStatus508, 164StatusCodes.Status510NotExtended => _bytesStatus510, 165StatusCodes.Status511NetworkAuthenticationRequired => _bytesStatus511,
KestrelBadHttpRequestException.cs (34)
34ex = new BadHttpRequestException(CoreStrings.BadRequest_InvalidRequestHeadersNoCRLF, StatusCodes.Status400BadRequest, reason); 37ex = new BadHttpRequestException(CoreStrings.BadRequest_InvalidRequestLine, StatusCodes.Status400BadRequest, reason); 40ex = new BadHttpRequestException(CoreStrings.BadRequest_MalformedRequestInvalidHeaders, StatusCodes.Status400BadRequest, reason); 43ex = new BadHttpRequestException(CoreStrings.BadRequest_MultipleContentLengths, StatusCodes.Status400BadRequest, reason); 46ex = new BadHttpRequestException(CoreStrings.BadRequest_UnexpectedEndOfRequestContent, StatusCodes.Status400BadRequest, reason); 49ex = new BadHttpRequestException(CoreStrings.BadRequest_BadChunkSuffix, StatusCodes.Status400BadRequest, reason); 52ex = new BadHttpRequestException(CoreStrings.BadRequest_BadChunkSizeData, StatusCodes.Status400BadRequest, reason); 55ex = new BadHttpRequestException(CoreStrings.BadRequest_BadChunkExtension, StatusCodes.Status400BadRequest, reason); 58ex = new BadHttpRequestException(CoreStrings.BadRequest_ChunkedRequestIncomplete, StatusCodes.Status400BadRequest, reason); 61ex = new BadHttpRequestException(CoreStrings.BadRequest_InvalidCharactersInHeaderName, StatusCodes.Status400BadRequest, reason); 64ex = new BadHttpRequestException(CoreStrings.BadRequest_RequestLineTooLong, StatusCodes.Status414UriTooLong, reason); 67ex = new BadHttpRequestException(CoreStrings.BadRequest_HeadersExceedMaxTotalSize, StatusCodes.Status431RequestHeaderFieldsTooLarge, reason); 70ex = new BadHttpRequestException(CoreStrings.BadRequest_TooManyHeaders, StatusCodes.Status431RequestHeaderFieldsTooLarge, reason); 73ex = new BadHttpRequestException(CoreStrings.BadRequest_RequestHeadersTimeout, StatusCodes.Status408RequestTimeout, reason); 76ex = new BadHttpRequestException(CoreStrings.BadRequest_RequestBodyTimeout, StatusCodes.Status408RequestTimeout, reason); 79ex = new BadHttpRequestException(CoreStrings.BadRequest_MethodNotAllowed, StatusCodes.Status405MethodNotAllowed, reason, HttpMethod.Options); 82ex = new BadHttpRequestException(CoreStrings.BadRequest_MethodNotAllowed, StatusCodes.Status405MethodNotAllowed, reason, HttpMethod.Connect); 85ex = new BadHttpRequestException(CoreStrings.BadRequest_MissingHostHeader, StatusCodes.Status400BadRequest, reason); 88ex = new BadHttpRequestException(CoreStrings.BadRequest_MultipleHostHeaders, StatusCodes.Status400BadRequest, reason); 91ex = new BadHttpRequestException(CoreStrings.BadRequest_InvalidHostHeader, StatusCodes.Status400BadRequest, reason); 94ex = new BadHttpRequestException(CoreStrings.BadRequest_UnrecognizedHTTPVersion, StatusCodes.Status505HttpVersionNotsupported, reason); 97ex = new BadHttpRequestException(CoreStrings.BadRequest_InvalidRequestHeader, StatusCodes.Status400BadRequest, reason); 100ex = new BadHttpRequestException(CoreStrings.BadRequest, StatusCodes.Status400BadRequest, reason); 127ex = new BadHttpRequestException(CoreStrings.HttpParserTlsOverHttpError, StatusCodes.Status400BadRequest, reason); 130ex = new BadHttpRequestException(CoreStrings.FormatBadRequest_InvalidRequestLine_Detail(detail), StatusCodes.Status400BadRequest, reason); 133ex = new BadHttpRequestException(CoreStrings.FormatBadRequest_InvalidRequestTarget_Detail(detail), StatusCodes.Status400BadRequest, reason); 136ex = new BadHttpRequestException(CoreStrings.FormatBadRequest_InvalidRequestHeader_Detail(detail), StatusCodes.Status400BadRequest, reason); 139ex = new BadHttpRequestException(CoreStrings.FormatBadRequest_InvalidContentLength_Detail(detail), StatusCodes.Status400BadRequest, reason); 142ex = new BadHttpRequestException(CoreStrings.FormatBadRequest_UnrecognizedHTTPVersion_Detail(detail), StatusCodes.Status505HttpVersionNotsupported, reason); 145ex = new BadHttpRequestException(CoreStrings.FormatBadRequest_FinalTransferCodingNotChunked(detail), StatusCodes.Status400BadRequest, reason); 148ex = new BadHttpRequestException(CoreStrings.FormatBadRequest_LengthRequiredHttp10(detail), StatusCodes.Status400BadRequest, reason); 151ex = new BadHttpRequestException(CoreStrings.FormatBadRequest_InvalidHostHeader_Detail(detail), StatusCodes.Status400BadRequest, reason); 154ex = new BadHttpRequestException(CoreStrings.FormatBadRequest_RequestBodyTooLarge(detail), StatusCodes.Status413PayloadTooLarge, reason); 157ex = new BadHttpRequestException(CoreStrings.BadRequest, StatusCodes.Status400BadRequest, reason);
Microsoft.AspNetCore.StaticAssets (13)
Development\StaticAssetDevelopmentRuntimeHandler.cs (3)
213var isRangeRequest = _context.Response.StatusCode == StatusCodes.Status206PartialContent; 221_context.Response.StatusCode = StatusCodes.Status416RangeNotSatisfiable; 297if (ctx.Response.StatusCode == StatusCodes.Status200OK)
StaticAssetsInvoker.cs (10)
119if (context.Response.StatusCode == StatusCodes.Status200OK) 143await SendStatusAsync(requestContext, StatusCodes.Status200OK); 176await SendStatusAsync(requestContext, StatusCodes.Status304NotModified); 180await SendStatusAsync(requestContext, StatusCodes.Status412PreconditionFailed); 191await ApplyResponseHeadersAsync(context, StatusCodes.Status200OK); 212if (requestContext.Response.StatusCode == StatusCodes.Status200OK) 214requestContext.Response.StatusCode = StatusCodes.Status416RangeNotSatisfiable; 224if (requestContext.Response.StatusCode == StatusCodes.Status200OK) 226requestContext.Response.StatusCode = StatusCodes.Status206PartialContent; 228await ApplyResponseHeadersAsync(requestContext, StatusCodes.Status206PartialContent);
Microsoft.AspNetCore.StaticFiles (9)
Helpers.cs (1)
43context.Response.StatusCode = StatusCodes.Status301MovedPermanently;
StaticFileContext.cs (8)
246if (_response.StatusCode == StatusCodes.Status200OK) 264if (statusCode == StatusCodes.Status200OK) 313await SendStatusAsync(StatusCodes.Status200OK); 337await SendStatusAsync(StatusCodes.Status304NotModified); 341await SendStatusAsync(StatusCodes.Status412PreconditionFailed); 353await ApplyResponseHeadersAsync(StatusCodes.Status200OK); 374await ApplyResponseHeadersAsync(StatusCodes.Status416RangeNotSatisfiable); 383await ApplyResponseHeadersAsync(StatusCodes.Status206PartialContent);
Microsoft.AspNetCore.Watch.BrowserRefresh (6)
src\sdk\src\Dotnet.Watch\Web.Middleware\BlazorWasmHotReloadMiddleware.cs (3)
66context.Response.StatusCode = StatusCodes.Status405MethodNotAllowed; 78context.Response.StatusCode = StatusCodes.Status204NoContent; 90context.Response.StatusCode = StatusCodes.Status400BadRequest;
src\sdk\src\Dotnet.Watch\Web.Middleware\ResponseStreamWrapper.cs (3)
105(response.StatusCode == StatusCodes.Status200OK || 106response.StatusCode == StatusCodes.Status404NotFound || 107response.StatusCode == StatusCodes.Status500InternalServerError) &&
Microsoft.AspNetCore.WebSockets (1)
WebSocketMiddleware.cs (1)
79context.Response.StatusCode = StatusCodes.Status403Forbidden;
Microsoft.DotNet.HotReload.Watch (1)
src\sdk\src\Dotnet.Watch\AspireService\AspireServerService.cs (1)
288context.Response.StatusCode = StatusCodes.Status400BadRequest;