89 references to Status301MovedPermanently
HttpsPolicySample (1)
Startup.cs (1)
16options.RedirectStatusCode = StatusCodes.Status301MovedPermanently;
Microsoft.AspNetCore.Http.Extensions (1)
ResponseExtensions.cs (1)
50response.StatusCode = permanent ? StatusCodes.Status301MovedPermanently : StatusCodes.Status302Found;
Microsoft.AspNetCore.Http.Results (10)
Results.cs (4)
494/// <description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description> 518/// <description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description> 542/// <description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description> 569/// <description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description>
ResultsCache.StatusCodes.cs (2)
101StatusCodes.Status301MovedPermanently => _status301MovedPermanently ??= new(StatusCodes.Status301MovedPermanently),
TypedResults.cs (4)
559/// <item><description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description></item> 579/// <item><description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description></item> 599/// <item><description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description></item> 623/// <item><description>When <paramref name="permanent"/> is set, sets the <see cref="StatusCodes.Status301MovedPermanently"/> status code.</description></item>
Microsoft.AspNetCore.Http.Results.Tests (1)
RedirectToRouteResultTests.cs (1)
56var expectedStatusCode = StatusCodes.Status301MovedPermanently;
Microsoft.AspNetCore.Mvc.Core (18)
ControllerBase.cs (18)
337/// (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="url"/>. 395/// true (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="localUrl"/>. 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 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 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"/>
Microsoft.AspNetCore.Mvc.Core.Test (1)
RedirectToRouteResultTest.cs (1)
120var expectedStatusCode = StatusCodes.Status301MovedPermanently;
Microsoft.AspNetCore.Mvc.RazorPages (39)
PageBase.cs (19)
420/// true (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="localUrl"/>. 497/// (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="url"/>. 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 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 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"/>
PageModel.cs (20)
727/// true (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="localUrl"/>. 826/// (<see cref="StatusCodes.Status301MovedPermanently"/>) using the specified <paramref name="url"/>. 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 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 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"/>
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCachePolicyProviderTests.cs (1)
270[InlineData(StatusCodes.Status301MovedPermanently)]
Microsoft.AspNetCore.ResponseCaching.Tests (1)
ResponseCachingPolicyProviderTests.cs (1)
296[InlineData(StatusCodes.Status301MovedPermanently)]
Microsoft.AspNetCore.Rewrite (2)
IISUrlRewrite\RedirectType.cs (1)
10Permanent = StatusCodes.Status301MovedPermanently,
RewriteOptionsExtensions.cs (1)
87return AddRedirectToHttps(options, statusCode: StatusCodes.Status301MovedPermanently, sslPort: null);
Microsoft.AspNetCore.Rewrite.Tests (11)
MiddlewareTests.cs (11)
152var options = new RewriteOptions().AddRedirect(pattern, replacement, statusCode: StatusCodes.Status301MovedPermanently); 189options.AddRedirect("(.*)", "http://example.com/$1", statusCode: StatusCodes.Status301MovedPermanently); 210var options = new RewriteOptions().AddRedirect("(.*)", "http://example.com/$1", statusCode: StatusCodes.Status301MovedPermanently); 232[InlineData(StatusCodes.Status301MovedPermanently)] 384Assert.Equal(StatusCodes.Status301MovedPermanently, (int)response.StatusCode); 392var options = new RewriteOptions().AddRedirectToHttps(statusCode: StatusCodes.Status301MovedPermanently, sslPort: sslPort); 411Assert.Equal(StatusCodes.Status301MovedPermanently, (int)response.StatusCode); 415[InlineData(StatusCodes.Status301MovedPermanently)] 532[InlineData(StatusCodes.Status301MovedPermanently)] 617var options = new RewriteOptions().AddRedirect("(.*)", "$1", statusCode: StatusCodes.Status301MovedPermanently); 813[InlineData(StatusCodes.Status301MovedPermanently)]
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Http\ReasonPhrases.cs (2)
29private static readonly byte[] _bytesStatus301 = CreateStatusBytes(StatusCodes.Status301MovedPermanently); 115StatusCodes.Status301MovedPermanently => _bytesStatus301,
Microsoft.AspNetCore.StaticFiles (1)
Helpers.cs (1)
43context.Response.StatusCode = StatusCodes.Status301MovedPermanently;