protected void Page_Load(object sender, EventArgs e) { CommonHelper.SetResponseNoCache(Response); CustomerManager.Logout(); string url = SEOHelper.GetAdminAreaLoginPageUrl(); Response.Redirect(url); }
/// <summary> /// Logout customer /// </summary> private void logout() { IoC.Resolve <ICustomerService>().Logout(); string loginURL = string.Empty; if (HozestERPContext.Current != null) { if (HozestERPContext.Current.IsAdmin) { loginURL = SEOHelper.GetAdminAreaLoginPageUrl(); } else { loginURL = SEOHelper.GetLoginPageUrl(); } HttpContext.Current.Response.Redirect(loginURL); } }
/// <summary> /// Logout customer /// </summary> private void logout() { CustomerManager.Logout(); string loginURL = string.Empty; if (NopContext.Current != null) { if (NopContext.Current.IsAdmin) { loginURL = SEOHelper.GetAdminAreaLoginPageUrl(); } else { loginURL = SEOHelper.GetLoginPageUrl(); } HttpContext.Current.Response.Redirect(loginURL); } }
protected override void OnPreInit(EventArgs e) { //admin user validation if (this.AdministratorSecurityValidationEnabled && !ValidateAdministratorSecurity()) { string url = SEOHelper.GetAdminAreaLoginPageUrl(); Response.Redirect(url); } //page security validation if (!ValidatePageSecurity()) { string url = SEOHelper.GetAdminAreaAccessDeniedUrl(); Response.Redirect(url); } if (this.IPAddressValidationEnabled && !ValidateIP()) { Response.Redirect(SEOHelper.GetAdminAreaAccessDeniedUrl()); } base.OnPreInit(e); }