当你的才华不能撑起你的野心时,就是你该选择学习的时候了!

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

posted @ 2019-08-01 17:42  hofmann  阅读(262)  评论(0编辑  收藏  举报