I have a method that figures out what to do with a user after
protected override ActionResult RedirectFromReg1(IPrincipal u)
{
if something....
{
return RedirectToAction("LogIn", "Account");
}
return null;
}
The calling code then returns the ActionResult or continues processing depending on if it is null.
The trouble is, that when you return a RedirectToAction, one loses all cookies set before the RedirectToAction. If I redirect to a string, I use response redirect and not end the request, keeping the cookies.
Response.Redirect(redirectTo, false);
Is there a similar way to use ActionResult or must I pass around strings? The potential universe of redirectTos is so large I'd rather not cache the cookie in the ViewData and re-add it in the request if I can avoid it.