When using Sitecore MVC, the static class that contains information about any current HTTP request is Sitecore.HttpContext. This class is a wrapper for the System.Web.HttpContext class, which provides access to the intrinsic objects of ASP.NET, such as Request, Response, Session, and Server. Sitecore.HttpContext also exposes some Sitecore-specific properties, such as Database, Device, Domain, and Site. Sitecore.HttpContext is different from Sitecore.Context, which is another static class that provides information about the current Sitecore context, such as Item, User, Language, and ContentDatabase. Sitecore.Request and Sitecore.HttpContext.Request are not valid classes in Sitecore MVC. References:
Sitecore.HttpContext Class - Sitecore
Sitecore.Context Class - Sitecore
HttpContext Class - Microsoft
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit