c# 异步方法中HttpContext.Current为空
2021-01-24 08:15
标签:details net ref article contex 方法 div span class 调用异步方法前 异步方法里 摘自:https://blog.csdn.net/chenjian88886666/article/details/82959252 c# 异步方法中HttpContext.Current为空 标签:details net ref article contex 方法 div span class 原文地址:https://www.cnblogs.com/WeiYongZhi/p/12050386.html HttpContext context = System.Web.HttpContext.Current;
HttpRuntime.Cache.Insert("context", context);
HttpContext context = HttpContext.Current;
if (context == null)
{
context = HttpRuntime.Cache.Get("context") as HttpContext;
}
文章标题:c# 异步方法中HttpContext.Current为空
文章链接:http://soscw.com/index.php/essay/46254.html