FAQ Database Discussion Community

ASP.NET MVC IAuthorizationFilter usage

In ASP.NET MVC, IAuthorizationFilter will run before any other filters and action methods. So is it appropriate to implement IAuthorizationFilter for some scenarios that some logic of checking and analysing the incoming HttpRequest needs to be executed before any other logic runs? Or IAuthorizationFilter should be used only for Authorization...

Use RedirectToRouteResult with Area failed

I'm using custom filter that check user access permission to specific Action and I have area called Admin. When filter redirect unauthorized user, its redirected inside area but not to the view in route directory. For example, when I access http://localhost/admin/roles I expect that unauthorized user will be redicreted to...