Before calling the asynchronous method
HttpContext context = System.Web.HttpContext.Current; HttpRuntime.Cache.Insert("context", context);
Asynchronous methods in
HttpContext context = HttpContext.Current; if (context == null) { context = HttpRuntime.Cache.Get("context") as HttpContext; }
Excerpt: https://blog.csdn.net/chenjian88886666/article/details/82959252