/// <summary>
        /// Description:验证用户是否登陆
        /// Author:xucixiao
        /// Date:2013-10-26
        /// </summary>
        /// <param name="filterContext"></param>
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            string lsURL = System.Configuration.ConfigurationManager.AppSettings["siteURL"];
            if (Session["user_"] == null)
            {
                if (filterContext.HttpContext.Request.IsAjaxRequest())
                {
                    filterContext.Result = new ContentResult() { Content = "-10" };
                }
                else
                {
                    filterContext.HttpContext.Response.Redirect(lsURL);
                }
            }
        }

相关文章:

  • 2022-01-07
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
猜你喜欢
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
相关资源
相似解决方案