views:

67

answers:

2

What is the advantage of intercepting a request for an ASP.Net application at the HttpContext level rather than waiting for the request to be processed by the HttpApplication pipeline?

+3  A: 

You're comparing apples to oranges. The HTTPContext holds the HTTP-specific information about an individual HTTP request while an HTTPApplication contains events that process that request.

Perhaps you are referring to HTTPHandlers and HTTPModules? In other words you would intercept a request using an HTTPHandler referencing the HTTPContext to get information about that request like the query string etc...

Bob Jacobs
Ah ha! When you said "you would intercept a request using an HTTPHandler referencing the HTTPContext to get information about that request like the query string etc" actually jived with what another developer and I have had a conversation about. While the code we're looking at isn't an advantage over HttpApplication, it's accessing a totally different area with different information. Thanks for the second opinion on this!
Chris
+2  A: 

This may help you in understanding the concepts

HttpContext Class

HttpApplication Class

Thanks

priyanka.sarkar_2