HttpApplication 類的一些說明

2022-02-02 16:26:04 字數 1040 閱讀 5822

以下**msdn:

注意:

按照以下順序引發應用程式事件:

beginrequest

authenticaterequest

postauthenticaterequest

authorizerequest

postauthorizerequest

resolverequestcache

postresolverequestcache

在 postresolverequestcache 事件之後和 postmaprequesthandler 事件之前,會建立乙個事件處理程式(乙個對應於請求 url 的頁)。如果伺服器在整合模式下執行 iis 7.0 並且 .net framework 至少為 3.0 版本,則會引發 maprequesthandler 事件。如果伺服器在經典模式下執行 iis 7.0 或者執行的是較早版本的 iis,則無法處理此事件。

postmaprequesthandler

acquirerequeststate

postacquirerequeststate

prerequesthandlerexecute

在此事件之後執行事件處理程式。

postrequesthandlerexecute

releaserequeststate

postreleaserequeststate

在引發 postreleaserequeststate 事件之後,現有的所有響應篩選器都將對輸出進行篩選。

updaterequestcache

postupdaterequestcache

logrequest.

僅在 iis 7.0 處於整合模式並且 .net framework 至少為 3.0 版本的情況下才支援此事件。

postlogrequest

僅在 iis 7.0 處於整合模式並且 .net framework 至少為 3.0 版本的情況下才支援此事件。

endrequest

執行順序如圖:

特別注意:

HttpApplication執行順序

應用程式按照以下順序執行由 global.asax 檔案中定義的模組或使用者 處理的事件 1 beginrequest 在 asp.net 響應請求時作為 http 執行管線鏈中的第乙個事件發生 2 authenticaterequest 當安全模組已建立使用者標識時發生。注 authenticat...

HttpApplication執行順序

應用程式按照以下順序執行由 global.asax 檔案中定義的模組或使用者 處理的事件 1 beginrequest 在 asp.net 響應請求時作為 http 執行管線鏈中的第乙個事件發生 2 authenticaterequest 當安全模組已建立使用者標識時發生。注 authenticat...

HttpApplication事件執行順序

應用程式按照以下順序執行由 global.asax 檔案中定義的模組或使用者 處理的事件 1 beginrequest 在 asp.net 響應請求時作為 http 執行管線鏈中的第乙個事件發生 2 authenticaterequest 當安全模組已建立使用者標識時發生。注 authenticat...