Josh Chamas wrote:
Currently, Application_OnStart only runs when the first Session gets
initialized, and again after the last Session expires.  Theoretically,
this could never happen if your application is always busy.  A big
difference between Apache::ASP, and IIS/ASP is that sessions persist
by default beyond the web server stop/start by writing to StateDir.

Aha! That's the ticket. If I nuke my StateDir, Application_OnStart() is called right when the first session is created.


The requests for this have been sporadic, and
it has never been one of my top priorities, should it be?

If the current behavior is useful for others, then it might be nice to have a new event that has the behavior I expected. No rush, this is mostly a syntax issue. (Reasoning below.) The top priority is simply to document the actual behavior of Application_OnStart. The current docs are misleading.


If the current behavior is of no use to anyone, then Application_OnStart should be modified to behave the way the docs currently imply. Aparently this will increase logical compatibility with IIS/ASP, generally a good thing. If it will take a long time to get around to doing this feature, the current behavior should be documented, possibly with a link to this thread in the mail archives for workarounds.

instead of calculating once per server start, it will be calculated
once per web process initialization of global.asa.

...


if you are
using script preloading with Loader(), then you will actually get this
calculation done during the parent web process init,

On reading the first quote, my question was, "How is code in Script_OnStart() different from code at the end of global.asa?"


I suspect the second quote hints at the answer: code at the end of global.asa runs only once if compiled in the parent httpd, whereas Script_OnStart() always runs once per httpd child creation regardless of whether global.asa is already compiled when the child starts. Yes? And if so, there is no difference between them when global.asa must be re-compiled for every httpd child, excepting order of events.

I had Loader() working on my stock RH7.2 systems, but it broke in RH9 for reasons I haven't bothered to chase down yet. I'll try re-enabling it later. If it works, it's a fix for my problem. The syntax is wanting compared to Application_OnStart, but I can live with that.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to