What is the difference between HttpApplication class and IHttpModule? Are they both same or different?
I see articles that mention the same events in both the classes.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
HttpApplicationis the web application instance that has multipleIHttpModuleinstances registered in it. That’s why everyIHttpModuleinstance handles a certain part of application execution thus can usually be reused on many applications (think of aSessionhandling module or authentication module).In terms of application/request handling there are many similarities.
HttpApplicationhas access to application-level events like OnStart, OnEnd etc as well as request-level events like OnBeginRequest, OnEndRequest etc.IHttpModuleon the other hand only has access to request-level events.I suggest you read a bit about application life cycle execution pipeline: