Last post Dec 14, 2010 03:07 PM by rstrahl
Dec 13, 2010 10:07 AM|MSTechie|LINK
I want to create my own HttpApplication class, wherein I can handle methods like ExecuteStep. Please let me know if there are any examples to do this. Kindly provide some pointers to this...
I am using VS 2008. Basically I want to handle all events from httpApplication class (even before global.asax) before it reaches web pages inside
Do other classes come into picture if I want to create my own HttpApplication class . Please help
Thanks in Advance
Dec 14, 2010 03:07 PM|rstrahl|LINK
HttpApplication is entirely loaded and driven by the HttpRuntime class which is responsible for instantiating it. I don't think there's any way to override the default class as the instantiation occurs completely internally as part of the HttpRuntime.ProcessRequest
hosting process and activation.
You can however create custom HttpRuntime implementations and if you poke around in the ASP.NET source code (with Reflector or the Reference Source) you might be able to find the code that's responsible for loading up HttpApplication and possibly hook into
that. But I suspect that this is hard coded somewhere deep in the bowels for the HttpRuntime class or its helpers.
Here's some info on hosting your own HttpRuntime which might be helpful as a starting point:
++ Rick ---