I have a Controller which has OnActionExecuting overridden as async method, this way:
protected override async void OnActionExecuting(ActionExecutingContext filterContext)
{
}
Inside that method I am calling some awaitable methods, such as await db.Empresa.FindAsync(EmpresaID); and await UserManager.FindByIdAsync(User.Identity.GetUserId());
With that, I am receiving the error: ASP.NET Controller: An asynchronous module or handler completed while an asynchronous operation was still pending.
Is it possible to make OnActionExecuting method as async? Is there a way to solve this?
Jaime