Hi Alvin,
Thank you for your explanation. Still, I don't understand something.
Application_OnStart event is raised only ONCE on the first instance of
HttpApplication. Right?
I saw many examples of code where they perform some global initialization
in
this handler
(such as reading config files, remote configuration to name a few).
However,
I didn't see any prevention against
other HttpApplication instaces access the results of configuration BEFORE
Application_OnStart event
handler ends its execution. So I came to the question I asked. Could
you
explain where I'm making
a mistake?
Marek
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
No such guarantee is made. I think there is some confusion in the
question
as well.
The application_onstart event handler is an event which fires when a
request
is paired with an httpapplication instance. The guarantee is only that
this
request will be associated with this one httpapplication instance,
that
is,
sequential processing thru the http pipeline until the request is
serviced
fully by that specific httpapplication instance. Each request/instance
pair
is handled on any available thread from the threadpool. The pairing
process
is not
sequential.
The responsibility of pairing falls to the httpruntime object. The
httpruntime object can handle many simultaneous concurrent
requests - limited only by the available threads in the threadpool
responsible for servicing requests. In this case, each request gets
paired
with an httpapplication instance. If the httpruntime could only
respond
to
one request at a time, this would create a bottleneck under load. Once a
request has been received, there is an implicit guarantee that the
request
can be associated with only one httpapplciation object.
--
Regards,
Alvin Bruney
[ASP.NET MVP
http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here...
http://tinyurl.com/27cok
Hi,
Is Application_OnStart event hadler guaranteed to finish its execution
before another HttpApplication object is brought into life?
Marek