I have this function in a controller –
[ServiceFilter(typeof(LoggedInAttribute))]
[HttpPut("bio")]
public ActionResult<string> ChangeBio(string UserId, string Bio)
{ ... }
and this attribute class –
public class LoggedInAttribute : ActionFilterAttribute
{
...
public async override void OnActionExecuting(ActionExecutingContext filterContext)
{
// HERE IS `filterContext.ActionArguments.Keys.Count` ALWAYS ZERO
// NO MATTER THE ACTION ITS CALLED FROM
}
...
}
Why could this be happening? This puzzles me the most, in one field it sees the parameters and in the other it doesn’t?
New contributor
Enormax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.