HttpContext.ApplicationInstance 属性


为当前 HTTP 请求获取或设置 HttpApplication 对象。Gets or sets the HttpApplication object for the current HTTP request.

 property System::Web::HttpApplication ^ ApplicationInstance { System::Web::HttpApplication ^ get(); void set(System::Web::HttpApplication ^ value); };
public System.Web.HttpApplication ApplicationInstance { get; set; }
member this.ApplicationInstance : System.Web.HttpApplication with get, set
Public Property ApplicationInstance As HttpApplication



当前 HTTP 请求的 HttpApplicationThe HttpApplication for the current HTTP request.

ASP.NET 使用 ApplicationInstance 代替 Application 作为属性名来引用当前的 HttpApplication 实例,以避免 ASP.NET 与经典 ASP 之间产生混淆。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. 在经典 ASP 中,Application 引用全局应用程序状态字典。In classic ASP, Application refers to the global application state dictionary.


Web 应用程序正在 IIS 7.0 集成模式下运行,并且已尝试将属性值从非 NULL 值更改为 nullThe 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.