0
I have a problem in the project, when accessing the default route, returns me the following error.
Esta página não está funcionando
Redirecionamento em excesso por localhost
Tente limpar os cookies.
ERR_TOO_MANY_REDIRECTS
The error happens when in my index, I redirect to another view
other’s controller
, if I give return View()
everything works.
namespace Portal.Web.Client.Controllers
{
[RoutePrefix("")]
[Route("{action=index}")]
public class HomeController : Controller
{
[Route("")]
[Route("index")]
public ActionResult Index()
{
//algumas coisas
if(condicao)
return RedirectToAction("sign-in","user"); // fica "chamando" este método (Action) infinita vezes.
else
return View(); //tudo funciona
}
}
}
Does anyone have any suggestions as to why this is happening, and how to resolve?