Add delegate to Application Start in HTTP Module

G

Guest

In the Init Method, I would like to add a delegate to the Application_Start.
However the Application_Start is not an event of the HTTPApplication class.
Is there some other way to access this event?
 
J

John Timney \(ASP.NET MVP\)

What are you trying to do? Application events are app wide, where a module
is typically request wide - thus the app start event does not occur when a
module request comes through the pipeline or it would happen on every
request. Best place for application start is in global.asax.

If you want to attache a delegate, let Init track whether app_start was
already handled using some static boolean (ie first request) - if not then
invoke some code, otherwise dont.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top