Difference between HttpApplication.Context and Controller.HttpContext

959 Views Asked by At

In MSDN it says

HttpApplication.Context:

Gets HTTP-specific information about the current request.

Controller.HttpContext:

Gets HTTP-specific information about an individual HTTP request.

Whats the difference between them. Are they both the same?

1

There are 1 best solutions below

0
whoah On BEST ANSWER

Are they both the same?

They are both the same. What is more, Controller.HttpContext is mockable (helpful for unittesting). They are point to the same data, but Controller.HttpContext provide more features like RouteData etc.