开发者

Will application_start event be fired when use auto-start mode

I have read this article http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx about auto-start mode in asp.net4.0 and still don't understand is application_start event fired on application warm-up or not? Article said that application are automaticaly preloaded with the logic, described in class, registered as serviceAutoStartProvider. But what about application start, is "preloaded" means that application_start also 开发者_JAVA百科fires, or it fires only after preloading on first request?


The event Application_Start is not fired by the IIS AutoStart feature. It is still fired upon first request.

You may check that the application is ready in "Application_Start" and run the init code if you find it is not. This way the application is compatible with IIS Express (it does not support AutoStart) and IIS 7.5.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜