According to your code,I put [RepAuthorization(Roles = "Admin")] and [Access] on one action.
HandleUnauthorizedRequest is executed first than OnActionExecuting in my demo.
I suggest you could add breakpoints on your code and check these filter.
Best Regards.
Yuki Tao
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
177 Points
629 Posts
HandleUnauthorizedRequest vs OnActionExecuting
Mar 01, 2019 04:13 AM|neoaguil17|LINK
Hi
I overwrite both methods, but.. What is the first method executed by ASP MVC.
This is my code:
Contributor
3710 Points
1431 Posts
Re: HandleUnauthorizedRequest vs OnActionExecuting
Mar 01, 2019 09:00 AM|Yuki Tao|LINK
Hi neoaguil17,
Do you mean which method do you enter first?
According to your code,I put [RepAuthorization(Roles = "Admin")] and [Access] on one action.
HandleUnauthorizedRequest is executed first than OnActionExecuting in my demo.
I suggest you could add breakpoints on your code and check these filter.
Best Regards.
Yuki Tao
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.