http://www.cnblogs.com/jinlongyu/archive/2010/08/23/1806668.html
当网站启动时,初始化Global.asax.cs的构造方法,然后调用Application_Start,在调用构造方法,在调用Application_BeginRequest,再用Application_AuthenticateRequest,然后如果是一个新页面,则调用Session_Start,然后调用Application_EndRequest。
如果是新网页,则调用Session_Start,如果不是,只是刷新,则不调用。
当IIS重启或者session超时时,调用Session_End。
大体顺序如下:
2009-12-17 13:24:52 [DEBUG] - Global()
2009-12-17 13:24:52 [DEBUG] - Application_Start
2009-12-17 13:24:52 [DEBUG] - Global()
2009-12-17 13:24:53 [DEBUG] - Application_BeginRequest
2009-12-17 13:24:53 [DEBUG] - Application_AuthenticateRequest
2009-12-17 13:24:53 [DEBUG] - Session_Start
2009-12-17 13:24:53 [DEBUG] - Application_EndRequest
==========
2009-12-17 13:26:22 [DEBUG] - Application_BeginRequest
2009-12-17 13:26:22 [DEBUG] - Application_AuthenticateRequest
2009-12-17 13:26:23 [DEBUG] - Application_EndRequest
==========
2009-12-17 13:27:25 [DEBUG] - Application_BeginRequest
2009-12-17 13:27:25 [DEBUG] - Application_AuthenticateRequest
2009-12-17 13:27:25 [DEBUG] - Session_Start
2009-12-17 13:27:25 [DEBUG] - Application_EndRequest
===========
2009-12-17 13:28:54 [DEBUG] - Session_End
2009-12-17 13:28:54 [DEBUG] - Session_End
2009-12-17 13:28:54 [DEBUG] - Application_End
==============
参考: http://blog.csdn.net/lenoval/archive/2009/06/12/4264152.aspx
http://ivorspace.blog.sohu.com/119245318.html
如果是新网页,则调用Session_Start,如果不是,只是刷新,则不调用。
当IIS重启或者session超时时,调用Session_End。
大体顺序如下:
2009-12-17 13:24:52 [DEBUG] - Global()
2009-12-17 13:24:52 [DEBUG] - Application_Start
2009-12-17 13:24:52 [DEBUG] - Global()
2009-12-17 13:24:53 [DEBUG] - Application_BeginRequest
2009-12-17 13:24:53 [DEBUG] - Application_AuthenticateRequest
2009-12-17 13:24:53 [DEBUG] - Session_Start
2009-12-17 13:24:53 [DEBUG] - Application_EndRequest
==========
2009-12-17 13:26:22 [DEBUG] - Application_BeginRequest
2009-12-17 13:26:22 [DEBUG] - Application_AuthenticateRequest
2009-12-17 13:26:23 [DEBUG] - Application_EndRequest
==========
2009-12-17 13:27:25 [DEBUG] - Application_BeginRequest
2009-12-17 13:27:25 [DEBUG] - Application_AuthenticateRequest
2009-12-17 13:27:25 [DEBUG] - Session_Start
2009-12-17 13:27:25 [DEBUG] - Application_EndRequest
===========
2009-12-17 13:28:54 [DEBUG] - Session_End
2009-12-17 13:28:54 [DEBUG] - Session_End
2009-12-17 13:28:54 [DEBUG] - Application_End
==============
参考: http://blog.csdn.net/lenoval/archive/2009/06/12/4264152.aspx
http://ivorspace.blog.sohu.com/119245318.html