How to deal with null HttpContext.Current when using auth filters with async/await?
问题 In one of apis in my controller I need to reference HttpContext.Current. Everything worked fine until I implemented a custom authentication filter. The filter uses async methods with await. However, with the filter in place, the HttpContext.Current is null when it reaches my controller. I'm assuming that this is because my controller executes on a different thread that it used to due to async/await in the filter. If this is the case, how should I access the 'original' context in my controller