问题描述
的HttpApplication的方法所期待的顺序是:
The expected order of HttpApplication methods is:
- 的Application_Start
- 在初始化
- 的Application_BeginRequest
- Application_AuthenticateRequest
- (页面生命周期)
- Application_EndRequest
我路过一个局面,这引发绝对不例外,其中,在初始化后,它会直接ApplicationEndRequest。它不叫的Application_BeginRequest没有启动页面生命cyle。
I'm passing through a situation, which throws absolutely no exception, in which, after the Init, it goes directly to ApplicationEndRequest. It doesn't call Application_BeginRequest neither initiates the page life cyle.
我该怎么办?
推荐答案
Application_EndRequest
的调用,但没有的Application_BeginRequest
时,前的Application_BeginRequest
那里有未处理的异常。
Application_EndRequest
is called but not Application_BeginRequest
when theres an unhandled exception prior to Application_BeginRequest
.
这可能是的Application_Start
,一些模块或初始化 Application_Init
That may be on Application_Start
, the initialization of some module or at Application_Init
这篇关于在什么情况下Application_EndRequest叫,但的Application_BeginRequest不叫?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!