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

上一篇:比较两个等长字符串是否含有完全相同字符(忽略字符顺序)


下一篇:kibana操作elasticsearch:查看索引库数据