簡體   English   中英

Global.asax.cs中的Session_Start和Session_End

[英]Session_Start & Session_End in Global.asax.cs

這兩個事件處理程序屬於哪個類的事件?

例如, Global.asax中的 Application_BeginRequest通過命名約定被注冊到HttpApplication類的BeginRequest。

在這3個類中,關於這2個會話事件,我找不到任何東西: HttpApplicationHttpContextHttpSessionState

它們屬於SessionStateModule

它是舊的文檔,但是如果您從將模塊與Global.asax文件一起使用開始,您會看到可以訂閱的事件由實現IHttpModule接口的類型公開。 並查看該接口的文檔,您將找到實現IHttpModule的內置類型:

Class                         Description
DefaultAuthenticationModule   Insures that an Authentication object is present in the context. This class cannot be inherited.
FileAuthorizationModule       Verifies that the remote user has NT permissions to access the file requested. This class cannot be inherited.
FormsAuthenticationModule     Enables ASP.NET applications to use forms authentication. This class cannot be inherited.
PassportAuthenticationModul   Provides a wrapper around PassportAuthentication services. This class cannot be inherited.
SessionStateModule            Provides session-state services for an application.
UrlAuthorizationModule        Provides URL-based authorization services for allowing or denying access to specified resources. This class cannot be inherited.
WindowsAuthenticationModule   Enables ASP.NET applications to use Windows/IIS authentication. This class cannot be inherited.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM