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 the `filterContext.ActionArguments.Keys.Count` is always zero
// no matter what action it's 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.