///added by honey.. protected void Session_Start(Object sender, EventArgs e) { if (!Request.FilePath.Contains("Default")) { string strPreviousPage = ""; if (Request.UrlReferrer != null) { strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1]; } if (strPreviousPage == "") { HttpContext.Current.Session.Add("CurrentCompany", "Company 1"); var routeData = new RouteData(); routeData.Values["controller"] = "Account"; routeData.Values["action"] = "Login"; Response.StatusCode = 500; IController controller = new HomeController(); var rc = new RequestContext(new HttpContextWrapper(Context), routeData); controller.Execute(rc); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)