Calling Async Methods in Action Filters in MVC 5

前端 未结 2 1027
后悔当初
后悔当初 2021-02-19 11:47

I\'m writing an Action Filter (inheriting from ActionFilterAttribute) which uses HttpClient to POST data to an external server in the OnResultExe

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 12:36

    Some guy kind of 'back ported' it here

    https://github.com/jdaigle/Hydrogen.Extensions.Mvc5

    I haven't tried it and can't recommend it but if you're in transition to .NET Core it might be worth considering. Fortunately I managed to remove all async code from my extension - this time.

提交回复
热议问题