I currently have an application which calls httpResponse.End() to end a request, however, following Microsoft’s recommendations and to keep it from throwing an exception I am trying to change it to HttpContext.CompleteRequest,
My question however is, what is the HttpContext object? And where do I get it inside the controller?
EDIT: I initially posted a question that was similar, in order to change the title I deleted the question and tried asking it again (there is probably a better way). StackOverflow prevented me from doing it because it was a ‘duplicate’, although I already deleted it. Adding this, so it allows me to post.
System.Web.HttpContextIt is static (Or at least has the appearance of being so) and accessible within MVC Controllers, ASP.NET web forms and I would assume ASP.NET web pages (have not used).
The
Currentproperty gives you access to Session, Cache and all the things you associate with an active Web context.