2
I looked for a solution to this but could not, I’m trying to redirect session errors to login, my application is inside a folder called Areas
and when he saw something redirect to him I redirect so :
<li><a href="@Url.Action("Enviadas", "Mensagem", new {PaginaAtual = 0, area = "Lojista" })"><i class="fa fa-envelope-o"></i>Enviadas</a></li>
But after I’m inside it I need to redirect to the login , which is in the Controllers folder outside the areas folder , (Controller and Areas are on the same level)
I’m trying to redirect like this :
if (loja == null)
{
return RedirectToAction("Index", "Login", new {area = "~/Controllers" });
}
But this giving problem of route, if anyone knows answers I will be grateful.
EDIT : At the moment I try to redirect I am in the Dashboard Controller which is on ~/Areas/Lojista/Dashboard
, and I need to redirect to the login, which is outside of Areas, which would be ~/Login
In this case the login is in the normal controller folder of ASP.net and the rest is in ~/Areas/Lojista