I'm overriding OnResultExecuted checking a condition: if it is true then redirect.
I'm struggling on figure out how to make redirect working. I have to launch redirect only on result executed because I have to check if the http response is 404 (if so redirect to a search page ... etc.)
Here's my code
protected override void OnResultExecuted(ResultExecutedContext filterContext)
{
[...]
filterContext.Result = new RedirectResult(redirectUrl);
base.OnResultExecuted(filterContext);
}
Any suggestions?