I have a MVC 5 website with localized routes defined as
routes.MapRoute(
name: \"Default\",
url: \"{culture}/{controller}/{action}/{
I improved Sentinel answer, to keep return url:
private static void ApplyRedirect(CookieApplyRedirectContext context)
{
//use this way to keep return url
var loginUrl = context.RedirectUri.Insert(
context.RedirectUri.IndexOf("/Account/Login"),
"/" + CultureHelper.GetCurrentCulture());
context.Response.Redirect(loginUrl);
}