public ActionResult Login(LoginModel model, string returnUrl) { // This method resulted in incompatible cookies //var client = GlobalHelper.GetClient(base.Session); //var response = client.Send<AuthResponse>(new Auth //{ // provider = CredentialsAuthProvider.Name, // UserName = model.Username, // Password = model.Password, // RememberMe = true //}); var authService = AppHostBase.Resolve<AuthService>(); authService.RequestContext = System.Web.HttpContext.Current.ToRequestContext(); var response = authService.Authenticate(new Auth { UserName = model.Username, Password = model.Password, RememberMe = model.RememberMe }); return RedirectToAction("Index", "OrganizationCategories"); }
public ActionResult Login() { ViewBag.ReturnUrl = "/OrganizationCategories"; var model = new LoginModel(); return View(model); }