I am trying to implement a task action method in my MVC 4 application. Everything works on the back in, but it is not redirecting.
public class AccountController : AsyncController
{
[HttpPost]
[AllowAnonymous]
public async Task<ActionResult> Login(LoginModel model, string returnUrl)
{
var client = new ClientHelper("login");
account = await client.CallActionType<LoginModel, Account>(EnumHelpers.HttpType.Post, model);
if (account != null)
{
validLogin = true;
}
return Redirect(returnUrl); // This is called but the page does not redirect, just sits a load
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…