Share via


IHttpContextFeature.HttpContext Property

Definition

The HttpContext associated with the connection if available.

public:
 property Microsoft::AspNetCore::Http::HttpContext ^ HttpContext { Microsoft::AspNetCore::Http::HttpContext ^ get(); void set(Microsoft::AspNetCore::Http::HttpContext ^ value); };
public Microsoft.AspNetCore.Http.HttpContext HttpContext { get; set; }
public Microsoft.AspNetCore.Http.HttpContext? HttpContext { get; set; }
member this.HttpContext : Microsoft.AspNetCore.Http.HttpContext with get, set
Public Property HttpContext As HttpContext

Property Value

Remarks

Connections can run on top of HTTP transports like WebSockets or Long Polling, or other non-HTTP transports. As a result, this API can sometimes return null depending on the configuration of your application.

Applies to