J
Joel Aufgang
Although the HttpApplication object contains an Application_Start event
handler method, it doesn't seem to have a public Start event that I can
attach a different event handler to. It's really strange. There's a
BeginRequest event that corresponds with ths Application_BeginRequest event
handler. There are similar corresponding events for all the Request
lifecycle event hadlers, but not for the session and application lifecycle
event handlers.
The problem is that I'd like to define a reusable framework class that
inherits from HttpApplication and then hae my app use that inherited class
instead. ie:
namespace myWebFramework
public class MyFrameworkApplication : HttpApplication {}
namespace MyWebApp
public class Global : MyWebFamework.MyFrameworkApplication { }
I've actually got this working and am providing reusable functionality to
MyWebApp through MyFrameworkApplication. I would really like to include
code that executes on application start in MyFrameworkApplication. i'd
exepected to be able to do this:
this.Start+= new System.EventHandler(this.MyFramework_Start);
but the start event doesn't exist (or is private). I don't want to use the
usual Application_Start method because that would then be overridden in
MyWebApp and I can't ensure that users of the framework would call
base.application_Start(sender,e)
Any suggestions on a workaround?
handler method, it doesn't seem to have a public Start event that I can
attach a different event handler to. It's really strange. There's a
BeginRequest event that corresponds with ths Application_BeginRequest event
handler. There are similar corresponding events for all the Request
lifecycle event hadlers, but not for the session and application lifecycle
event handlers.
The problem is that I'd like to define a reusable framework class that
inherits from HttpApplication and then hae my app use that inherited class
instead. ie:
namespace myWebFramework
public class MyFrameworkApplication : HttpApplication {}
namespace MyWebApp
public class Global : MyWebFamework.MyFrameworkApplication { }
I've actually got this working and am providing reusable functionality to
MyWebApp through MyFrameworkApplication. I would really like to include
code that executes on application start in MyFrameworkApplication. i'd
exepected to be able to do this:
this.Start+= new System.EventHandler(this.MyFramework_Start);
but the start event doesn't exist (or is private). I don't want to use the
usual Application_Start method because that would then be overridden in
MyWebApp and I can't ensure that users of the framework would call
base.application_Start(sender,e)
Any suggestions on a workaround?