小编jmo*_*999的帖子

使用 ASP.NET MVC 5 登录后重定向到 Angular 路由

我正在使用 asp.net mvc 5 应用程序日志记录,并在 AccountController 中执行以下日志操作:

    // POST: /Account/Login
    [HttpPost]
    [AllowAnonymous]
    [ValidateAntiForgeryToken]
    public async Task<ActionResult> Login(LoginViewModel model, string returnUrl)
    {

          ## not working, just a trial
        ##returnUrl = "Dashboard#!/requests";

        if (!ModelState.IsValid)
        {
            return View(model);
        }

        // This doesn't count login failures towards account lockout
        // To enable password failures to trigger account lockout, change >to shouldLockout: true

        var result = await > >SignInManager.PasswordSignInAsync(model.UserName, model.Password,
Run Code Online (Sandbox Code Playgroud)

model.RememberMe, shouldLockout: false);

        switch (result)
        {
            case SignInStatus.Success:
                return RedirectToLocal(returnUrl);
            case SignInStatus.LockedOut:
                return View("Lockout");
            case …
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc-routing angularjs angularjs-routing asp.net-mvc-5

5
推荐指数
1
解决办法
4169
查看次数