public ActionResult Index() { string name = base.User.Identity.Name; if (ConfigurationManager.AppSettings["ADLogin"] == "1") { string nextUrl = string.Empty; //base.Session.Contents["User"] = AdLoginHelper.TryAdLogin(name, out nextUrl, "Session Start"); System.Web.HttpContext.Current.Session["User"] = AdLoginHelper.TryAdLogin(name, out nextUrl, "Session Start"); if (!StringHelper.isNullOrEmpty(nextUrl)) { base.Response.Redirect(nextUrl); } } else { //base.Response.Redirect("/Accounts/Login"); base.Response.Redirect("http://b2b.spreadtrum.com:2012/", true); } return(null); }
public ActionResult Index() { string name = base.User.Identity.Name; if (ConfigurationManager.AppSettings["ADLogin"] == "1") { string nextUrl = string.Empty; //base.Session.Contents["User"] = AdLoginHelper.TryAdLogin(name, out nextUrl, "Session Start"); System.Web.HttpContext.Current.Session["User"] = AdLoginHelper.TryAdLogin(name, out nextUrl, "Session Start"); if (!StringHelper.isNullOrEmpty(nextUrl)) { base.Response.Redirect(nextUrl); } } else { //base.Response.Redirect("/Accounts/Login"); base.Response.Redirect("https://sdx.unisoc.com/_forms/default.aspx?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F&Source=" + HttpUtility.UrlEncode(base.Request.Url.ToString(), System.Text.Encoding.UTF8), true); } return(null); }
private User TryAdLogin(out string nextUrl) { return(AdLoginHelper.TryAdLogin(base.User.Identity.Name, out nextUrl, "OnActionExecuting")); }