The HttpContextWrapper class derives from the HttpContextBase class and serves as a wrapper for the HttpContext class. This class exposes the functionality of the HttpContext class and also exposes the HttpContextBase type. The HttpContextBase class lets you replace the original implementation of the HttpContext class in your application with a custom implementation, such as when you perform unit testing outside the ASP.NET pipeline.