HttpContext.ApplicationInstance 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
接收或設定 HttpApplication 當前 HTTP 請求的物件。
public:
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
屬性值
目前 HttpApplication 的 HTTP 請求。
ASP.NET 使用 ApplicationInstance 代替 Application 作為屬性名稱,以指稱目前的 HttpApplication 實例,以避免 ASP.NET 與經典 ASP 混淆。 在經典的 ASP 中,指 Application 的是全域應用程式狀態字典。
例外狀況
網頁應用程式在 IIS 7.0 的整合模式下運行,嘗試將屬性值從非空值改為 null。