HttpContext.ApplicationInstance Property

Definition

Gets or sets the HttpApplication object for the current HTTP request.

C#
public System.Web.HttpApplication ApplicationInstance { get; set; }

Property Value

The HttpApplication for the current HTTP request.

ASP.NET uses ApplicationInstance instead of Application as a property name to refer to the current HttpApplication instance in order to avoid confusion between ASP.NET and classic ASP. In classic ASP, Application refers to the global application state dictionary.

Exceptions

The Web application is running under IIS 7.0 in Integrated mode, and an attempt was made to change the property value from a non-null value to null.

Applies to

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

See also