RedirectResult from ActionFilterAttribute
I made a custom ActionFilterAttribute which checks a URL to see if the domains are contained in a whitelist of domains. It's working, but I need to redirect to a failure page on failure.
Can I use the following call?
filterContext.Result = new RedirectResult("/error/Unauthorized");
and what about the path?
ErrorController : Controller
with the following action method
public ActionResult Unauthorized
and it returns the following view:
and I see the Shared View
yet, I get the error:
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.