1 override of PathBase
Microsoft.AspNetCore.Http (1)
Internal\DefaultHttpRequest.cs (1)
67public override PathString PathBase
5 writes to PathBase
Microsoft.AspNetCore.Http.Abstractions (4)
Extensions\MapMiddleware.cs (2)
61context.Request.PathBase = pathBase.Add(matchedPath); 70context.Request.PathBase = pathBase;
Extensions\UsePathBaseMiddleware.cs (2)
55context.Request.PathBase = originalPathBase.Add(matchedPath); 64context.Request.PathBase = originalPathBase;
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
383request.PathBase = PathString.FromUriComponent(currentValues.Prefix);
87 references to PathBase
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenStore.cs (1)
92var pathBase = httpContext.Request.PathBase.ToString();
Microsoft.AspNetCore.Authentication (4)
AuthenticationHandler.cs (2)
59protected PathString OriginalPathBase => Context.Features.Get<IAuthenticationFeature>()?.OriginalPathBase ?? Request.PathBase; 106get => Request.Scheme + Uri.SchemeDelimiter + Request.Host + Request.PathBase + Request.Path + Request.QueryString;
AuthenticationMiddleware.cs (1)
45OriginalPathBase = context.Request.PathBase
RequestPathBaseCookieBuilder.cs (1)
28var originalPathBase = context.Features.Get<IAuthenticationFeature>()?.OriginalPathBase ?? context.Request.PathBase;
Microsoft.AspNetCore.Components.Endpoints (4)
Rendering\EndpointHtmlRenderer.cs (2)
247request.PathBase, 254var result = UriHelper.BuildAbsolute(request.Scheme, request.Host, request.PathBase);
Rendering\EndpointHtmlRenderer.EventDispatch.cs (1)
96var baseUri = $"{_httpContext.Request.Scheme}://{_httpContext.Request.Host}{_httpContext.Request.PathBase}/";
TempData\CookieTempDataProvider.cs (1)
147var pathBase = httpContext.Request.PathBase.ToString();
Microsoft.AspNetCore.Diagnostics (2)
StatusCodePage\StatusCodePagesExtensions.cs (2)
110context.HttpContext.Response.Redirect(context.HttpContext.Request.PathBase + location); 239OriginalPathBase = context.HttpContext.Request.PathBase.Value!,
Microsoft.AspNetCore.Diagnostics.Abstractions (1)
IStatusCodeReExecuteFeature.cs (1)
17/// The <see cref="HttpRequest.PathBase"/> of the original request.
Microsoft.AspNetCore.Hosting (14)
Internal\HostingApplicationDiagnostics.cs (5)
497var path = (request.PathBase.HasValue || request.Path.HasValue) ? (request.PathBase + request.Path).ToString() : "/"; 559[DynamicDependency(nameof(HttpRequest.PathBase), typeof(HttpRequest))] 631_path = (httpContext.Request.PathBase.HasValue 632? httpContext.Request.PathBase + httpContext.Request.Path
Internal\HostingRequestFinishedLog.cs (3)
438 => new KeyValuePair<string, object?>(nameof(request.PathBase), request.PathBase.Value), 66_cachedToString = $"Request finished {request.Protocol} {request.Method} {request.Scheme}://{request.Host.Value}{request.PathBase.Value}{request.Path.Value}{request.QueryString.Value} - {response.StatusCode.ToString(CultureInfo.InvariantCulture)} {ValueOrEmptyMarker(response.ContentLength)} {EscapedValueOrEmptyMarker(response.ContentType)} {Elapsed.TotalMilliseconds.ToString("0.0000", CultureInfo.InvariantCulture)}ms";
Internal\HostingRequestStartingLog.cs (3)
316 => new KeyValuePair<string, object?>(nameof(_request.PathBase), _request.PathBase.Value), 48_cachedToString = $"Request starting {request.Protocol} {request.Method} {request.Scheme}://{request.Host.Value}{request.PathBase.Value}{request.Path.Value}{request.QueryString.Value} - {EscapedValueOrEmptyMarker(request.ContentType)} {ValueOrEmptyMarker(request.ContentLength)}";
Internal\HostingRequestUnhandledLog.cs (3)
263 => new KeyValuePair<string, object?>(nameof(_httpContext.Request.PathBase), _httpContext.Request.PathBase), 44_cachedToString = $"Request reached the end of the middleware pipeline without being handled by application code. Request path: {request.Method} {request.Scheme}://{request.Host}{request.PathBase}{request.Path}, Response status code: {response.StatusCode}";
Microsoft.AspNetCore.Http (2)
src\aspnetcore\src\Shared\Debugger\HttpContextDebugFormatter.cs (2)
94!request.PathBase.HasValue && 114sb.Append(CultureInfo.InvariantCulture, $"{scheme}://{host}{request.PathBase.Value}{request.Path.Value}{(includeQueryString ? request.QueryString.Value : string.Empty)}");
Microsoft.AspNetCore.Http.Abstractions (6)
Extensions\MapMiddleware.cs (1)
58var pathBase = context.Request.PathBase;
Extensions\UsePathBaseMiddleware.cs (1)
53var originalPathBase = context.Request.PathBase;
HttpRequest.cs (2)
57/// The value may be <see cref="PathString.Empty"/> if <see cref="PathBase"/> contains the full path, 168public PathString PathBase => _request.PathBase;
src\aspnetcore\src\Shared\Debugger\HttpContextDebugFormatter.cs (2)
94!request.PathBase.HasValue && 114sb.Append(CultureInfo.InvariantCulture, $"{scheme}://{host}{request.PathBase.Value}{request.Path.Value}{(includeQueryString ? request.QueryString.Value : string.Empty)}");
Microsoft.AspNetCore.Http.Extensions (3)
UriHelper.cs (3)
185return BuildAbsolute(request.Scheme, request.Host, request.PathBase, request.Path, request.QueryString); 194return BuildRelative(request.PathBase, request.Path, request.QueryString); 206return string.Concat([request.Scheme, SchemeDelimiter, request.Host.Value, request.PathBase.Value, request.Path.Value, request.QueryString.Value]);
Microsoft.AspNetCore.Http.Results (1)
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
23var applicationPath = httpContext.Request.PathBase;
Microsoft.AspNetCore.HttpLogging (4)
HttpLoggingFields.cs (1)
23/// and <see cref="HttpRequest.PathBase"/>.
HttpLoggingMiddleware.cs (2)
133logContext.AddParameter(nameof(request.PathBase), request.PathBase);
W3CLoggingMiddleware.cs (1)
134shouldLog |= AddToList(elements, _uriStemIndex, (request.PathBase + request.Path).ToUriComponent());
Microsoft.AspNetCore.HttpOverrides (2)
ForwardedHeadersMiddleware.cs (2)
365if (request.PathBase.HasValue) 368requestHeaders[_options.OriginalPrefixHeaderName] = request.PathBase.ToString();
Microsoft.AspNetCore.HttpsPolicy (1)
HttpsRedirectionMiddleware.cs (1)
105request.PathBase,
Microsoft.AspNetCore.Mvc.Core (9)
RequireHttpsAttribute.cs (1)
93request.PathBase.ToUriComponent(),
Routing\ControllerLinkGeneratorExtensions.cs (2)
31/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 117/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used.
Routing\PageLinkGeneratorExtensions.cs (2)
30/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 118/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used.
Routing\UrlHelperBase.cs (3)
131var pathBase = ActionContext.HttpContext.Request.PathBase; 305var applicationPath = httpContext.Request.PathBase; 470var pathBase = ActionContext.HttpContext.Request.PathBase;
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
23var applicationPath = httpContext.Request.PathBase;
Microsoft.AspNetCore.Mvc.TagHelpers (7)
GlobbingUrlBuilder.cs (1)
55/// The base path of the current request (i.e. <see cref="HttpRequest.PathBase"/>).
ImageTagHelper.cs (1)
144var pathBase = ViewContext.HttpContext.Request.PathBase;
LinkTagHelper.cs (2)
477ViewContext.HttpContext.Request.PathBase); 536var pathBase = ViewContext.HttpContext.Request.PathBase;
ResourceCollectionUtilities.cs (1)
14var pathBase = viewContext.HttpContext.Request.PathBase;
ScriptTagHelper.cs (2)
430var pathBase = ViewContext.HttpContext.Request.PathBase; 479ViewContext.HttpContext.Request.PathBase);
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
CookieTempDataProvider.cs (1)
131var pathBase = httpContext.Request.PathBase.ToString();
DefaultHtmlGenerator.cs (1)
282action = request.PathBase + request.Path + request.QueryString;
Microsoft.AspNetCore.OutputCaching (3)
OutputCacheKeyProvider.cs (3)
98if (ContainsDelimiters(request.PathBase.Value) || 123.Append(request.PathBase.Value) 129.AppendUpperInvariant(request.PathBase.Value)
Microsoft.AspNetCore.ResponseCaching (3)
ResponseCachingKeyProvider.cs (3)
43ThrowIfContainsDelimiters(request.PathBase.Value); 60.Append(request.PathBase.Value) 66.AppendUpperInvariant(request.PathBase.Value)
Microsoft.AspNetCore.Rewrite (4)
RedirectRule.cs (1)
31var pathBase = request.PathBase;
RedirectToHttpsRule.cs (1)
33var newUrl = UriHelper.BuildAbsolute("https", host, req.PathBase, req.Path, req.QueryString, default);
RedirectToWwwHelper.cs (1)
50request.PathBase,
UrlActions\RedirectAction.cs (1)
33var pathBase = context.HttpContext.Request.PathBase;
Microsoft.AspNetCore.Routing (10)
DefaultLinkGenerator.cs (2)
91pathBase ?? httpContext.Request.PathBase, 144pathBase ?? httpContext.Request.PathBase,
LinkGeneratorEndpointNameAddressExtensions.cs (4)
23/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 63/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 166/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 225/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used.
LinkGeneratorRouteValuesAddressExtensions.cs (4)
23/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 63/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 166/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 225/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used.
Microsoft.AspNetCore.Routing.Abstractions (2)
LinkGenerator.cs (2)
37/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 92/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used.
Microsoft.AspNetCore.StaticFiles (2)
Helpers.cs (1)
45var redirect = UriHelper.BuildAbsolute(request.Scheme, request.Host, request.PathBase, request.Path + "/", request.QueryString);
HtmlDirectoryFormatter.cs (1)
48PathString requestPath = context.Request.PathBase + context.Request.Path;