HttpContext.Application 属性


为当前 HTTP 请求获取 HttpApplicationState 对象。Gets the HttpApplicationState object for the current HTTP request.

 property System::Web::HttpApplicationState ^ Application { System::Web::HttpApplicationState ^ get(); };
public System.Web.HttpApplicationState Application { get; }
member this.Application : System.Web.HttpApplicationState
Public ReadOnly Property Application As HttpApplicationState


当前 HTTP 请求的 HttpApplicationStateThe HttpApplicationState for the current HTTP request.

若要获取当前 HTTP 请求的 HttpApplication 对象,请使用 ApplicationInstanceTo get the HttpApplication object for the current HTTP request, use ApplicationInstance. (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.)