Intermediate Class between HttpApplication and Global

F

Fernando Arámburu

Hy everybody,

I´m working on an ASP.NET framework and and I need to extend
System.Web.HttpApplication. I mean, I need to put some intermediate class
between System.Web.HttpApplication and Global class on Global.asax file.
What I need, in code, is the following:

public class MyhttpApplication : System.Web.HttpApplication

and then , Global class extends myHttpApplication

public class Global : MyHttpApplication

Till now, everything is ok, because nothing strange in on that. The
problem I found is that I need that both my class (MyHttpApplication) and
the Global class (on the Global.asax file) listen the same events or can
write code for the same events, for example,Session_Start y
Application_Start..
Why do I need this? Because I need to let the programmer works as he works
when Global extend HttpApplication and I also need to listen those events
because My Framework do something when those event ocurr.

The real problem is that ASP.NET at compile time, it generates explicit
calls to Application_Start and Session_Start using Object_Event way.

protected void Application_Start(Object sender, EventArgs e)
{
}

so I can´t have Application_Start on both my class (MyHttpApplication) and
the Global class, because is not possible to define the same method
signature without using the override, new or any keyword that may help.

I hope somebody has understood my problem and provide me a good solution
for my problem. I really need help cause my class needs to listen to those
events but I must let programmers to also listen to those events as the way
they did before.

Thanks in advance.

Fernando Arámburu
 

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
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top