This has had me stumped for a while. None of the commonly encountered similar situations seem to apply here apparently. I\'ve probably missed something obvious but I can\'
In my case, none of the above solutions worked. I am using .Net Core 3.1 with a custom IAuthorizationFilter and I had to do the following:
IAuthorizationFilter
public void OnAuthorization(AuthorizationFilterContext context) { if (context.ActionDescriptor.EndpointMetadata.OfType().Any()) return;