internal static void SetSiteObject() { string siteID = ConfigurationManager.AppSettings["SiteID"]; if (siteID != null && siteID != "") { CmsSite site = BaseObject.GetById <CmsSite>(new Guid(siteID)); if (site != null) { site.CurrentWorkingEnvironment = SessionObject.GetWorkingEnvironment(new Guid(siteID)); } HttpContext.Current.Session["CurrentSite"] = site; } }
protected void Session_Start(object sender, EventArgs e) { SessionObject.SetSiteObject(); }