HttpContext Constructors

Definition

Initializes a new instance of the HttpContext class.

Overloads

HttpContext(HttpWorkerRequest)

Initializes a new instance of the HttpContext class that uses the specified worker-request object.

HttpContext(HttpRequest, HttpResponse)

Initializes a new instance of the HttpContext class by using the specified request and response objects.

HttpContext(HttpWorkerRequest)

Initializes a new instance of the HttpContext class that uses the specified worker-request object.

C#
public HttpContext(System.Web.HttpWorkerRequest wr);

Parameters

wr
HttpWorkerRequest

The HttpWorkerRequest object for the current HTTP request.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

HttpContext(HttpRequest, HttpResponse)

Initializes a new instance of the HttpContext class by using the specified request and response objects.

C#
public HttpContext(System.Web.HttpRequest request, System.Web.HttpResponse response);

Parameters

request
HttpRequest

The HttpRequest object for the current HTTP request.

response
HttpResponse

The HttpResponse object for the current HTTP request.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1