HttpContext is null
作者:互联网
HttpContext context1 = System.Web.HttpContext.Current;
HttpContext context2 = System.Runtime.Remoting.Messaging.CallContext.HostContext as HttpContext; //当前(请求)线程上下文
bool isEqual = object.ReferenceEquals(context1, context2);
Response.Write("context1与context2是否相同的实例:" + isEqual);
//HttpRuntime.Cache.Get
标签:Web,context2,context1,System,isEqual,HttpContext,null 来源: https://www.cnblogs.com/hofmann/p/11284198.html