The problem
I have an api GET method to retrieve site configuration. I am using httpClient
and the GetAsync()
method to d
There is no way to (reliably) call an asynchronous method from an ASP.NET MVC 5 action filter. This has already been fixed in ASP.NET vNext, but AFAIK there are no plans to support this in MVC 5.
If you absolutely must do this in an action filter, then you must use synchronous calls (e.g., WebClient
instead of HttpClient
).