I have tried many options like below with taking answers from many SO questions
filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { action = "Index", controller = "Home" }));
base.OnActionExecuting(filterContext);
filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { action = "Index", controller = "Home" }));
filterContext.Result.ExecuteResult(filterContext.Controller.ControllerContext);
filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { action = "Index", controller = "Home" }));
return;
filterContext.Result = new RedirectResult("~/");
But none of the options redirect, it calls index method of home controller but redirection is not working.
Please advise.
Thanks