DefaultHttpContext DefaultHttpContext DefaultHttpContext DefaultHttpContext Class

Definition

public ref class DefaultHttpContext sealed : Microsoft::AspNetCore::Http::HttpContext
public sealed class DefaultHttpContext : Microsoft.AspNetCore.Http.HttpContext
type DefaultHttpContext = class
    inherit HttpContext
Public NotInheritable Class DefaultHttpContext
Inherits HttpContext
Inheritance
DefaultHttpContextDefaultHttpContextDefaultHttpContextDefaultHttpContext

Constructors

DefaultHttpContext() DefaultHttpContext() DefaultHttpContext() DefaultHttpContext()
DefaultHttpContext(IFeatureCollection) DefaultHttpContext(IFeatureCollection) DefaultHttpContext(IFeatureCollection) DefaultHttpContext(IFeatureCollection)

Properties

Authentication Authentication Authentication Authentication

This is obsolete and will be removed in a future version. The recommended alternative is to use Microsoft.AspNetCore.Authentication.AuthenticationHttpContextExtensions. See https://go.microsoft.com/fwlink/?linkid=845470.

Connection Connection Connection Connection
Features Features Features Features
FormOptions FormOptions FormOptions FormOptions
HttpContext HttpContext HttpContext HttpContext
Items Items Items Items
Request Request Request Request
RequestAborted RequestAborted RequestAborted RequestAborted
RequestServices RequestServices RequestServices RequestServices
Response Response Response Response
ServiceScopeFactory ServiceScopeFactory ServiceScopeFactory ServiceScopeFactory
Session Session Session Session
TraceIdentifier TraceIdentifier TraceIdentifier TraceIdentifier
User User User User
WebSockets WebSockets WebSockets WebSockets

Methods

Abort() Abort() Abort() Abort()
Initialize(IFeatureCollection) Initialize(IFeatureCollection) Initialize(IFeatureCollection) Initialize(IFeatureCollection)
Uninitialize() Uninitialize() Uninitialize() Uninitialize()

Extension Methods

AuthenticateAsync(HttpContext) AuthenticateAsync(HttpContext) AuthenticateAsync(HttpContext) AuthenticateAsync(HttpContext)

Extension method for authenticate using the DefaultAuthenticateScheme scheme.

AuthenticateAsync(HttpContext, String) AuthenticateAsync(HttpContext, String) AuthenticateAsync(HttpContext, String) AuthenticateAsync(HttpContext, String)

Extension method for authenticate.

ChallengeAsync(HttpContext) ChallengeAsync(HttpContext) ChallengeAsync(HttpContext) ChallengeAsync(HttpContext)

Extension method for authenticate using the DefaultChallengeScheme scheme.

ChallengeAsync(HttpContext, AuthenticationProperties) ChallengeAsync(HttpContext, AuthenticationProperties) ChallengeAsync(HttpContext, AuthenticationProperties) ChallengeAsync(HttpContext, AuthenticationProperties)

Extension method for authenticate using the DefaultChallengeScheme scheme.

ChallengeAsync(HttpContext, String) ChallengeAsync(HttpContext, String) ChallengeAsync(HttpContext, String) ChallengeAsync(HttpContext, String)

Extension method for Challenge.

ChallengeAsync(HttpContext, String, AuthenticationProperties) ChallengeAsync(HttpContext, String, AuthenticationProperties) ChallengeAsync(HttpContext, String, AuthenticationProperties) ChallengeAsync(HttpContext, String, AuthenticationProperties)

Extension method for Challenge.

ForbidAsync(HttpContext) ForbidAsync(HttpContext) ForbidAsync(HttpContext) ForbidAsync(HttpContext)

Extension method for Forbid using the DefaultForbidScheme scheme..

ForbidAsync(HttpContext, AuthenticationProperties) ForbidAsync(HttpContext, AuthenticationProperties) ForbidAsync(HttpContext, AuthenticationProperties) ForbidAsync(HttpContext, AuthenticationProperties)

Extension method for Forbid.

ForbidAsync(HttpContext, String) ForbidAsync(HttpContext, String) ForbidAsync(HttpContext, String) ForbidAsync(HttpContext, String)

Extension method for Forbid.

ForbidAsync(HttpContext, String, AuthenticationProperties) ForbidAsync(HttpContext, String, AuthenticationProperties) ForbidAsync(HttpContext, String, AuthenticationProperties) ForbidAsync(HttpContext, String, AuthenticationProperties)

Extension method for Forbid.

GetTokenAsync(HttpContext, String) GetTokenAsync(HttpContext, String) GetTokenAsync(HttpContext, String) GetTokenAsync(HttpContext, String)

Extension method for getting the value of an authentication token.

GetTokenAsync(HttpContext, String, String) GetTokenAsync(HttpContext, String, String) GetTokenAsync(HttpContext, String, String) GetTokenAsync(HttpContext, String, String)

Extension method for getting the value of an authentication token.

SignInAsync(HttpContext, ClaimsPrincipal) SignInAsync(HttpContext, ClaimsPrincipal) SignInAsync(HttpContext, ClaimsPrincipal) SignInAsync(HttpContext, ClaimsPrincipal)

Extension method for SignIn using the DefaultSignInScheme.

SignInAsync(HttpContext, ClaimsPrincipal, AuthenticationProperties) SignInAsync(HttpContext, ClaimsPrincipal, AuthenticationProperties) SignInAsync(HttpContext, ClaimsPrincipal, AuthenticationProperties) SignInAsync(HttpContext, ClaimsPrincipal, AuthenticationProperties)

Extension method for SignIn using the DefaultSignInScheme.

SignInAsync(HttpContext, String, ClaimsPrincipal) SignInAsync(HttpContext, String, ClaimsPrincipal) SignInAsync(HttpContext, String, ClaimsPrincipal) SignInAsync(HttpContext, String, ClaimsPrincipal)

Extension method for SignIn.

SignInAsync(HttpContext, String, ClaimsPrincipal, AuthenticationProperties) SignInAsync(HttpContext, String, ClaimsPrincipal, AuthenticationProperties) SignInAsync(HttpContext, String, ClaimsPrincipal, AuthenticationProperties) SignInAsync(HttpContext, String, ClaimsPrincipal, AuthenticationProperties)

Extension method for SignIn.

SignOutAsync(HttpContext) SignOutAsync(HttpContext) SignOutAsync(HttpContext) SignOutAsync(HttpContext)

Extension method for SignOut using the DefaultSignOutScheme.

SignOutAsync(HttpContext, AuthenticationProperties) SignOutAsync(HttpContext, AuthenticationProperties) SignOutAsync(HttpContext, AuthenticationProperties) SignOutAsync(HttpContext, AuthenticationProperties)

Extension method for SignOut using the DefaultSignOutScheme.

SignOutAsync(HttpContext, String) SignOutAsync(HttpContext, String) SignOutAsync(HttpContext, String) SignOutAsync(HttpContext, String)

Extension method for SignOut.

SignOutAsync(HttpContext, String, AuthenticationProperties) SignOutAsync(HttpContext, String, AuthenticationProperties) SignOutAsync(HttpContext, String, AuthenticationProperties) SignOutAsync(HttpContext, String, AuthenticationProperties)

Extension method for SignOut.

GetEndpoint(HttpContext) GetEndpoint(HttpContext) GetEndpoint(HttpContext) GetEndpoint(HttpContext)

Extension method for getting the Endpoint for the current request.

SetEndpoint(HttpContext, Endpoint) SetEndpoint(HttpContext, Endpoint) SetEndpoint(HttpContext, Endpoint) SetEndpoint(HttpContext, Endpoint)

Extension method for setting the Endpoint for the current request.

GetServerVariable(HttpContext, String) GetServerVariable(HttpContext, String) GetServerVariable(HttpContext, String) GetServerVariable(HttpContext, String)

Gets the value of a server variable for the current request.

GetHttpRequestMessage(HttpContext) GetHttpRequestMessage(HttpContext) GetHttpRequestMessage(HttpContext) GetHttpRequestMessage(HttpContext)
GetRouteData(HttpContext) GetRouteData(HttpContext) GetRouteData(HttpContext) GetRouteData(HttpContext)

Gets the RouteData associated with the provided httpContext.

GetRouteValue(HttpContext, String) GetRouteValue(HttpContext, String) GetRouteValue(HttpContext, String) GetRouteValue(HttpContext, String)

Gets a route value from Values associated with the provided httpContext.

GetIISServerVariable(HttpContext, String) GetIISServerVariable(HttpContext, String) GetIISServerVariable(HttpContext, String) GetIISServerVariable(HttpContext, String)

Gets the value of a server variable for the current request.

Applies to